From 3e22822c1d2397be730c458c7539d0eb8c113a24 Mon Sep 17 00:00:00 2001 From: lyingbug Date: Wed, 14 Oct 2026 15:20:30 +0800 Subject: [PATCH] chore(release): finalize v0.8.3 website and documentation (#4285) * chore(release): prepare v0.8.3 website and documentation * docs(website): broaden release highlights and simplify browser layout * docs(website): keep feature descriptions and screenshots in view * docs(website): show four expanded release highlights * docs(website): show browser states beside screenshots * docs(website): unify section backgrounds and spacing * fix(website): sync product screenshots and refine hero content * fix(website): add gallery detail view and refine feature headings * docs: illustrate mention resource selection in v0.8.3 release notes * docs(release): finalize v0.8.3 release date and publication wording --- CHANGELOG.md | 77 + README.md | 18 +- README_CN.md | 18 +- README_JA.md | 18 +- README_KO.md | 18 +- VERSION | 2 +- docs/docs.go | 1952 +++++++++++++++- docs/release-v0.8.3-audit.md | 367 ++++ docs/swagger.json | 1954 ++++++++++++++++- docs/swagger.yaml | 1484 ++++++++++++- docs/swagger_contract_test.go | 50 + frontend/package-lock.json | 4 +- frontend/package.json | 2 +- helm/Chart.yaml | 2 +- internal/application/service/model_catalog.go | 6 +- internal/handler/knowledge.go | 4 +- internal/handler/system_model_catalog.go | 43 + website-docs/.vitepress/theme/SiteHeader.vue | 2 +- .../01-getting-started/01-introduction.md | 2 +- .../01-getting-started/02-installation.md | 4 +- .../01-getting-started/03-quickstart.md | 2 +- .../01-getting-started/04-configuration.md | 13 +- website-docs/03-features/02-knowledge-base.md | 20 +- .../03-features/05-retrieval-engines.md | 6 + website-docs/03-features/06-models.md | 8 +- website-docs/03-features/07-agent.md | 12 +- website-docs/03-features/08-mcp.md | 4 +- website-docs/03-features/14-wiki.md | 14 +- .../03-features/18-chat-experience.md | 27 +- website-docs/03-features/20-platform-admin.md | 18 +- website-docs/03-features/22-skills-sandbox.md | 6 + website-docs/03-features/25-seafile.md | 3 + website-docs/04-api/01-api-overview.md | 6 +- website-docs/04-api/02-api-agent-mcp.md | 8 +- website-docs/04-api/02-api-chat.md | 6 +- website-docs/04-api/02-api-knowledge.md | 36 + website-docs/04-api/02-api-model-system.md | 2 +- website-docs/04-api/02-api-system.md | 12 + website-docs/05-clients/01-frontend.md | 2 +- website-docs/05-clients/05-desktop.md | 2 + website-docs/06-development/01-dev-guide.md | 2 +- .../06-development/02-database-schema.md | 29 +- .../06-development/03-extension-points.md | 4 +- website-docs/07-releases/v0.8.3.md | 125 ++ website-docs/README.md | 44 +- website-docs/VERSION | 2 +- website-docs/homepage/BRAND-ASSETS.md | 14 +- website-docs/homepage/app/brands.tsx | 1 + website-docs/homepage/app/home.module.css | 50 +- website-docs/homepage/app/layout.tsx | 2 +- website-docs/homepage/app/page.tsx | 86 +- website-docs/homepage/app/product-gallery.tsx | 10 +- website-docs/homepage/package.json | 5 +- .../public/docs/_home/brands/seafile.png | Bin 0 -> 7568 bytes .../public/docs/_home/product/agent-chat.png | Bin 557480 -> 616430 bytes .../_home/product/chat-source-location.png | Bin 0 -> 1272527 bytes .../_home/product/kb-image-gallery-detail.png | Bin 0 -> 2853418 bytes .../docs/_home/product/kb-image-gallery.png | Bin 0 -> 4455181 bytes .../product/kb-image-vector-settings.png | Bin 0 -> 661846 bytes .../docs/_home/product/wiki-graph-groups.png | Bin 0 -> 2139996 bytes .../homepage/scripts/audit-content.mjs | 16 +- .../scripts/sync-product-screenshots.mjs | 26 + .../scripts/sync-product-screenshots.test.mjs | 27 + website-docs/package-lock.json | 4 +- website-docs/package.json | 2 +- .../screenshots/chat-attachment-read.png | Bin 0 -> 677882 bytes .../screenshots/chat-mention-selector.png | Bin 0 -> 415988 bytes .../screenshots/chat-source-location.png | Bin 0 -> 1272527 bytes .../public/screenshots/datasource-seafile.png | Bin 0 -> 562917 bytes .../screenshots/kb-image-gallery-detail.png | Bin 0 -> 2853418 bytes .../public/screenshots/kb-image-gallery.png | Bin 0 -> 4455181 bytes .../screenshots/kb-image-vector-settings.png | Bin 0 -> 661846 bytes .../screenshots/system-admin-create-user.png | Bin 0 -> 594589 bytes .../screenshots/system-model-catalog.png | Bin 0 -> 711064 bytes .../screenshots/system-user-management.png | Bin 0 -> 574468 bytes .../public/screenshots/wiki-graph-groups.png | Bin 0 -> 2139996 bytes website-docs/scripts/check-site.mjs | 2 +- website-docs/scripts/test-docker.mjs | 2 +- website-docs/scripts/test-integration.mjs | 4 +- website-docs/shared/header.ts | 2 +- 80 files changed, 6469 insertions(+), 224 deletions(-) create mode 100644 docs/release-v0.8.3-audit.md create mode 100644 website-docs/07-releases/v0.8.3.md create mode 100644 website-docs/homepage/public/docs/_home/brands/seafile.png create mode 100644 website-docs/homepage/public/docs/_home/product/chat-source-location.png create mode 100644 website-docs/homepage/public/docs/_home/product/kb-image-gallery-detail.png create mode 100644 website-docs/homepage/public/docs/_home/product/kb-image-gallery.png create mode 100644 website-docs/homepage/public/docs/_home/product/kb-image-vector-settings.png create mode 100644 website-docs/homepage/public/docs/_home/product/wiki-graph-groups.png create mode 100644 website-docs/homepage/scripts/sync-product-screenshots.mjs create mode 100644 website-docs/homepage/scripts/sync-product-screenshots.test.mjs create mode 100644 website-docs/public/screenshots/chat-attachment-read.png create mode 100644 website-docs/public/screenshots/chat-mention-selector.png create mode 100644 website-docs/public/screenshots/chat-source-location.png create mode 100644 website-docs/public/screenshots/datasource-seafile.png create mode 100644 website-docs/public/screenshots/kb-image-gallery-detail.png create mode 100644 website-docs/public/screenshots/kb-image-gallery.png create mode 100644 website-docs/public/screenshots/kb-image-vector-settings.png create mode 100644 website-docs/public/screenshots/system-admin-create-user.png create mode 100644 website-docs/public/screenshots/system-model-catalog.png create mode 100644 website-docs/public/screenshots/system-user-management.png create mode 100644 website-docs/public/screenshots/wiki-graph-groups.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 61338315..bfa8339c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,83 @@ All notable changes to this project will be documented in this file. +## [0.8.3] - 2026-10-14 + +Changes since v0.8.2, through upstream main `31c605568` (2026-10-13; 282 commits). The plugin-system series was reverted and is not part of this release. [Website release notes](./website-docs/07-releases/v0.8.3.md) · [Full commit comparison](https://github.com/Tencent/WeKnora/compare/v0.8.2...31c6055687d33f9ad7a92cf453a264ce13a1700d). + +### New Features + +- **Image gallery** — browse document images in an infinite masonry view, search captions/OCR, filter observed attributes and multiple source documents, and inspect images with their source metadata (#3694, #4130, #4156, #4159, #4190). +- **Multimodal Embedding and retrieval** — support for multimodal embedding models that encode text and images into a shared vector space, including Tencent WeMM-Embedding and Qwen3-VL-Embedding; opt-in image-vector retrieval; image-aware reranking and image context for vision chat models. Existing knowledge bases remain opted out; enable multimodal processing and `image_vector_enabled`, then reparse existing documents. Scanned PDF pages are excluded (#3683, #4013, #4080). +- **Source citation navigation** — open cited passages in original PDF, Office, Markdown, TXT and EPUB files; audio references seek to segment timestamps where available. Older documents fall back to text matching until reparsed (#3700, #3794, #4139). +- **On-demand chat attachments** — upload persists the source and queues background parsing; Quick Answer waits for pending parses after the stream starts, while agents use `read_file` to read `attachment://` documents and images when needed, with or without a sandbox. Small ready files may be inlined; successful image observations can be reused for the same model and reading request. Attachments referenced by live conversations or forks survive TTL cleanup (#4203). +- **Platform user management** — list users, create accounts, enable/disable accounts, reset passwords and manage system administrators in System Settings. Disabling revokes sessions; self-disable and disabling the last active administrator are rejected (#4153). +- **Invitation registration mode** — `invite_register` allows new accounts only through valid invitations. The legacy `invite_only` value now disables invitation registration as well as public password registration; existing users can still accept invitations (#3900). +- **Administrator model catalog** — inspect built-in/deployment/effective catalogs, preview and publish an overlay, and restore historical configurations with optimistic version and deployment-baseline checks (#3662). +- **Model integrations** — Hugging Face TEI, Pinecone Inference and Cohere v2 reranking; WeMM-Embedding 2B/4B/9B presets and a Transformers serving script; Claude Opus/Sonnet/Haiku 5.5 catalog entries. The catalog now includes 30 built-in vendors (#3956, #3957, #4158, #4238). +- **MCP interoperability** — support `2026-07-28` discovery alongside `2025-11-25` initialization; external peers negotiate independently. OAuth supports preregistered clients and JWT Bearer assertions for callers without an interactive browser when the upstream supports that grant (#4095, #4229). +- **Agent tool catalog** — `GET /agents/tools` exposes selectable tools and capability requirements to the editor; empty and unset tool lists have distinct semantics, and new unknown tool names are rejected (#4211). +- **Docker sandbox terminal** — interactive terminal support joins Cube/E2B; Docker disconnect ends the shell, and reconnect starts a new shell (#4023). +- **Lite host skills** — install and run skills on the macOS desktop host, with version directories and activation separate from the workspace catalog (#3661). +- **Seafile connector** — synchronize selected library files/directories with hierarchy, incremental checkpoints, bounded downloads and optional deletion reconciliation; encrypted libraries and SeaDoc are excluded (#3616). +- **Data source capabilities** — Confluence directory hierarchy and private image assets (#3319), Yuque TOC hierarchy (#3476), and uploaded Office/PDF files from DingTalk Docs (#3786). +- **Chat UI** — global search within the @ mention menu, unread-reply markers, clearer rewind confirmation, and screenshot paste in embedded chat (#4249, #4247). +- **Cross-KB Wiki search** — `POST /wiki-search` searches accessible Wiki scopes (#3535). +- **Traditional Chinese UI** — add `zh-TW`, including Seafile translations (#3916). + +### Improvements + +- **Retrieval APIs** share rerank behavior and diagnostics; `knowledge-search` exposes thresholds, retrieval switches and rerank overrides. Knowledge-base and explicit-document scopes are a union; document-only search must omit the enclosing KB IDs (#3675, #4191). +- **Retrieval quality and cost** — correct recall, score scales, RRF rank handling and tool behavior; accelerate MMR with sparse postings; skip KB retrieval for summarize intent; show FILTER_TOP_K and graph-query truncation explicitly to the model (#3687, #3758, #3885). +- **Multimodal models** — batch Qwen3-VL-Embedding message inputs, keep text and images in the same embedding space, and expose image-input and rerank capabilities in the editor (#4126, #4080). Image/OCR processing records distinct validation outcomes instead of indexing empty, repetitive or truncated output (#4132, #4135). +- **Wiki** — improve graph layout, theme captions and group focus (#4147); reject machine whole-page rewrites that lose table rows (#3793); drain follow-up work with bounded concurrency; resolve titles for unloaded backlinks (#3931). +- **Parser integrations** — AnyDoc 0.2.4 parses assets once; self-hosted MinerU 4.0 V1 API is detected alongside legacy endpoints. MinerU/cloud parse timeouts follow configurable budgets (#3891). +- **Description generation** — `KNOWLEDGE_BASE_PROFILE_MAX_TOKENS` raises the default knowledge-base description completion budget to 2048 and makes it configurable (#4230). +- **Agent runtime** — stream-establishment waits obey idle timeouts; LLM retries honor `Retry-After`; file-read budgets count paths; tool validation preserves numeric precision, counts Unicode string lengths correctly and compares enums without string coercion (#3936, #3937). +- **MCP UX/runtime** — service and skill list search (#3731), tool approval can be followed by OAuth authorization (#4248), structured and embedded resource results reach agents (#3766), and slow connection cleanup no longer blocks unrelated services. +- **Chat/editor UX** — smoother citation streaming/highlights; preserve Markdown list content, caret and indentation selection boundaries; preserve external-link targets and literal single tildes; fewer redundant startup requests and false unsaved-change prompts (#3562, #3818, #3963, #4195, #4224). +- **Model usage** — agent completion events carry the actual turn chat-model ID, distinct from the originally requested message model when fallback occurs (#4252). +- **Datasource robustness** — bounded pagination and response sizes across Feishu, Notion, IMA, Yuque and GitLab; Feishu Wiki request pacing and rate-limit retries (#3645, #3770, #3840, #3841, #3889, #3890, #3985, #4039). +- **Observability** — distinguish retrieval diagnostic spans and close terminal/superseded document-processing spans (#3855, #4128). +- **UI consistency** — refine sidebar, list pages, toolbox, settings, knowledge-base hints and citation views (#4154, #4193). + +### Bug Fixes + +- **Index persistence** — Elasticsearch CopyIndices preserves vectors/enabled state (#3678); bulk item errors surface (#3842); Qdrant waits for writes, handles concurrent collection creation and uses returned pagination offsets (#3882, #3999); Milvus copies vectors without offset-window loss and preserves connection/resolver behavior (#3654, #3883); Weaviate handles concurrent class creation, bounded cursors and GraphQL failures (#3689, #3881); SQLite index writes roll back instead of silently leaving partial rows (#3768, #3843). Qdrant/Milvus keyword failures are no longer reported as empty matches (#3847). +- **Document processing** — avoid stranded processing/finalizing rows (#3696), retry transient indexing failures (#3915), remove written chunks after quota rejection (#3656), reject invalid JSON before asynchronous parsing (#3360), reject malformed or truncated summaries (#3769), skip deleted-document/empty table-summary work, and clean FAQ payloads while preserving cloned entry body/index state (#3993). +- **Parsing fidelity** — repair malformed Excel fill styles and unsupported validation ranges (#3608, #3638); preserve PPTX fallback image associations (#3973); resolve EPUB images relative to spine-ordered chapters and preserve inline previews (#3924, #3977, #4226); preserve whitespace-only inline elements (#3978), Markdown fences, escaped table pipes and table child source offsets (#3969, #3979); align AnyDoc EMF/WMF extensions (#3938); bound remote image downloads (#3906). +- **Datasource consistency** — preserve retryable cursors after Notion/Yuque detail failures (#3682, #3693, #3702), stop deletion reconciliation after truncated Notion discovery (#3845), expose block-limit truncation (#3771), remove old searchable bodies when Notion/IMA/GitLab sources are emptied (#4008), compare GitLab commit snapshots and bound downloads (#3887), retry RSS full-text fallback and update unchanged article titles/links (#3824). DingTalk skips and unsupported blocks are visible, and partial workspace access no longer invalidates the entire source (#3782, #3822, #4079). Manual-only sync and cron validation persist correctly (#3653). +- **Agent correctness** — preserve adjacent assistant tool calls (#3574); recover tool and MCP-prewarm panics (#3846); reject broken/cancelled compaction streams as checkpoints (#3994); preserve steering order through persistence failures (#4078) and attach queued follow-up answers to the right question; preserve SQL string literals and adjacent prefixed Python literals (#3812, #4006); keep failed table loads retryable and skip style-only worksheets (#3660, #3745). +- **Authorization and credentials** — database analysis is scoped to authorized shared KBs (#4136); failed token persistence cannot report a successful login; canonical storage references work in bare providers (#3166); cloned/released images acquire resource catalog bindings (#3752); access logs stop buffering full request bodies (#3927), and LLM debug logs stay inside their directory. +- **MCP** — retain dynamic-registration client secrets (#3763), reconnect forgotten sessions (#3765), report advertised directory failures (#3905), include shared KBs in endpoint scopes (#3848), bound resource pagination (#4007), preserve other callers’ current connections during authorization while recycling stale registrations (#4138), fix OAuth expiry across process time zones (#4207), preserve disabled state at creation, close legacy error responses (#3930), and mark read-only tools non-destructive. +- **Models** — report only thinking levels the wire format can send (#3552), honor legacy OpenRouter thinking (#3807), send explicit empty assistant content for tool-call turns (#3605), avoid unsupported Claude temperature (#4155), treat HTTP 400 as reachable in chat connection tests (#3929), and preserve copied model names (#3830). +- **Chat/integrations** — restore valid file/tool/KB selections, preserve reference custom metadata (#4087), allow image-only embedded messages, fix host-context follow-up suggestions, correct desktop browser pairing against the local listener (#3677), and allow shared agents to use the caller's local browser. Tenant administrators can manage channel sessions (#3939). +- **IM** — preserve WeCom images alongside text (#3901), validate custom WeCom WSS endpoints, handle unresolved Feishu resource images (#2761), and retry Yunzhijia attachment downloads (#3809). +- **Skills/sandbox** — skip vendored dependency trees during verification (#3943), do not fail installs on non-blocking observations (#4246), heal sandbox idle-sweep races (#3980), pass desktop slot timing into renewal, recognize E2B `in_progress` builds (#4108), and omit environment overrides on Aliyun E2B snapshot creation (#4054). +- **Wiki** — retain pending work when source lookup fails (#3715); propagate per-page link-rebuild failures (#3884). +- **Knowledge graph** — preserve entity-relationship direction and document provenance (#3950). +- **CLI/Go SDK** — preserve recursive upload folders (#3753), apply list limits after filters/sorts (#3990), render paginated text results (#3984), propagate pagination read errors (#3983), classify wrapped HTTP errors (#3992), preserve jq integer precision (#3991), replay multipart uploads (#3989), and parse multiline SSE with optional field spacing (#2122, #3975). +- **Miscellaneous** — Metaso non-webpage scopes return results (#4010), web-search count honors its configured maximum (#4011), dataset generation accepts a selected answer model and a supported default (#3944, #3965), COS uses virtual-hosted S3 addressing (#3722), dead-letter messages truncate at rune boundaries (#3964), and graceful shutdown runs resource cleanup (#3804). + +### Upgrade Notes + +- `invite_only` now blocks password signup even with an invitation; choose `invite_register` to retain invitation signup. `DISABLE_REGISTRATION=true` still maps to `invite_only`. OIDC provisioning and administrator-created accounts are separate. +- `allowed_tools: []` now means no selected built-ins; missing/null selects defaults. Migrations rewrite existing smart-reasoning empty arrays to explicit defaults. An agent using all KBs then follows the same capability filter as an explicitly selected default list, excluding Wiki-only KBs from that retrieval scope. Switch-managed tools retain their independent controls. +- PostgreSQL migrations **000111–000118** add model-catalog overrides, embeddings lookup indexes, gallery projections/backfill, source locators, extension upgrades, explicit agent defaults, attachment reference indexing and timezone-aware OAuth timestamps. SQLite migrations **000031–000036** cover the applicable changes and fill the previously missing MCP metadata schema. +- ParadeDB now uses **`paradedb/paradedb:v0.25.11-pg17`**. Migration 000115 upgrades eligible installed pg_search 0.22.0–0.25.10 and vector 0.8.0–0.8.3 when the target extension packages are available. Follow the [database upgrade guide](./website-docs/01-getting-started/06-paradedb-upgrade.md); do not run the old 0.22.6 upgrade command against the new image. Allow time for image projection backfill and ordinary index creation; very large embeddings tables may prebuild the same indexes concurrently. +- Existing image vectors are not generated retroactively. Reparse selected documents after enabling image retrieval, and rebuild vectors created with incompatible old text-input encoding when switching to Qwen3-VL-Embedding/WeMM message-based templates. +- OAuth migration treats existing naive timestamps as UTC; tokens previously written with a shifted non-UTC value need reauthorization or refresh. Live conversation attachments now persist beyond their upload TTL, increasing retention-related storage use. +- MCP tool calls outside the endpoint allowlist return JSON-RPC `-32602` rather than an `isError` tool result. Docker terminal reconnect opens a new shell. + +### Infrastructure, Tests & Documentation + +- Helm pins app/frontend/docreader images to appVersion by default, exposes Service-name overrides and rollout strategy, and documents shared-storage requirements (#3669, #4109, #4180). +- Build real arm64 sandbox/Cube images; support app/docreader download mirrors (#4073); install CA certificates before BrowserSkill mirror substitution (#4104); fix dev-script exit propagation and MinIO image retrieval. +- Make outbound dialing configurable with `WEKNORA_OUTBOUND_DIAL_TIMEOUT` (default 5s), including Compose forwarding (#4122, #4157). Keep existing migration objects tolerated where appropriate (#4164). +- Regenerate Swagger from current handlers, document system model-catalog endpoints, and correct the processing-trace route base path; retain reproducible generation (#3751); clarify frontend proxy configuration, upload folder paths, model copy, retrieval-scope semantics and API quickstart tenant extraction; refresh license notices (#4178). +- Refresh website feature/API/deployment documentation, add this release page and real product screenshots, update homepage/navigation and the project version to 0.8.3. Preserve historical release notes. +- Add or strengthen regressions for parsing/splitting, SSE, attachments, tool selection, multimodal protocols, connectors, index failures, OAuth, user management and platform configuration; synchronize host-skill and concurrent-schema tests to avoid timing-only failures. + ## [0.8.2] - 2026-09-24 ### New Features diff --git a/README.md b/README.md index 120e233c..258fd240 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@

Website Docs - Release + Release License Stars
@@ -138,13 +138,13 @@ docker compose down # Stop services If you already have WeKnora running and downloaded a newer release: ```bash -# Set WEKNORA_VERSION in .env to the target release (e.g. 0.8.2), or keep latest +# Set WEKNORA_VERSION in .env to the target release (e.g. 0.8.3), or keep latest docker compose pull # Pull images matching WEKNORA_VERSION docker compose up -d # Recreate containers with new images ``` > [!NOTE] -> `docker compose up -d` alone reuses locally cached images and may leave the UI version out of sync with the release you downloaded. Read the [upgrade notes](https://weknora.weixin.qq.com/docs/07-releases/v0.8.2#upgrade-notes) before moving from v0.8.0. +> `docker compose up -d` alone reuses locally cached images and may leave the UI version out of sync with the release you downloaded. Read the [upgrade notes](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3#upgrade-notes) before upgrading. Deployments older than v0.8.2 should also read the [v0.8.2 notes](https://weknora.weixin.qq.com/docs/07-releases/v0.8.2#upgrade-notes). ### Other ways to deploy @@ -166,6 +166,16 @@ All options, hardware requirements and deployment topologies: [Installation guid ## What's New +### v0.8.3 · 2026-10-14 · [release notes](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3) + +- **Image gallery**: browse document images and filter by source, caption, OCR and image attributes. +- **Multimodal Embedding**: support for multimodal embedding models that encode text and images into a shared vector space, including Tencent WeMM-Embedding and Qwen3-VL-Embedding, with opt-in image-vector retrieval and compatible image-aware reranking. +- **Wiki graph**: clearer group layouts and theme captions, with group focus, switching and return to the full graph. +- **Source citations**: navigate from an answer to the cited passage in the original document. +- **Chat and tools**: on-demand attachment reading without a sandbox, unread replies, @ mention search, Docker terminals, Lite host skills and MCP interoperability updates. +- **Administration and integrations**: platform user management, invitation-only signup mode, administrator model catalog, WeMM embeddings, TEI/Pinecone/Cohere reranking, Seafile and Traditional Chinese. +- **Reliability**: broad retrieval, parsing, datasource, Wiki, OAuth and CLI fixes. Review [upgrade requirements](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3#upgrade-notes) for registration modes, empty tool lists, database migrations and reindexing. + ### v0.8.2 · 2026-09-24 · [release notes](https://weknora.weixin.qq.com/docs/07-releases/v0.8.2) Agents can operate the browser on your computer, knowledge bases can be published to other AI tools over MCP, and a running conversation can be steered, forked or rewound. @@ -364,7 +374,7 @@ The full product documentation lives at **[weknora.weixin.qq.com/docs](https://w | [Configuration](https://weknora.weixin.qq.com/docs/01-getting-started/04-configuration) | Environment variables and models | | [Troubleshooting FAQ](https://weknora.weixin.qq.com/docs/01-getting-started/05-troubleshooting) | Common problems and fixes | | [API reference](https://weknora.weixin.qq.com/docs/04-api/01-api-overview) | REST API overview | -| [Release notes](https://weknora.weixin.qq.com/docs/07-releases/v0.8.2) | What changed in each release | +| [Release notes](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3) | What changed in each release | ## Development diff --git a/README_CN.md b/README_CN.md index 0ae6a3e5..5438f923 100644 --- a/README_CN.md +++ b/README_CN.md @@ -10,7 +10,7 @@

官方网站 产品文档 - 版本 + 版本 许可证 Stars
@@ -138,13 +138,13 @@ docker compose down # 停止服务 若已有部署并下载了更新的 release: ```bash -# 在 .env 中将 WEKNORA_VERSION 设为目标版本(如 0.8.2),或保持 latest +# 在 .env 中将 WEKNORA_VERSION 设为目标版本(如 0.8.3),或保持 latest docker compose pull # 拉取与 WEKNORA_VERSION 匹配的镜像 docker compose up -d # 用新镜像重建容器 ``` > [!NOTE] -> 仅执行 `docker compose up -d` 会复用本地缓存镜像,可能导致 Web UI 显示版本与下载的 release 不一致。从 v0.8.0 升级前请先阅读[升级须知](https://weknora.weixin.qq.com/docs/07-releases/v0.8.2#upgrade-notes)。 +> 仅执行 `docker compose up -d` 会复用本地缓存镜像,可能导致 Web UI 显示版本与下载的 release 不一致。升级前请先阅读[升级须知](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3#upgrade-notes)。 ### 其他部署方式 @@ -166,6 +166,16 @@ docker compose up -d # 用新镜像重建容器 ## 最新更新 +### v0.8.3 · 2026-10-14 · [版本说明](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3) + +- **画廊**:集中浏览文档图片,按来源、描述、OCR 与图片属性筛选,查看原图和出处。 +- **多模态 Embedding**:支持将文字与图片编码到同一向量空间的多模态向量模型,例如腾讯 WeMM-Embedding、Qwen3-VL-Embedding 等;可按需开启图片向量检索,并搭配支持图片输入的重排模型。 +- **Wiki 图谱**:重新组织分组布局与主题说明,支持聚焦分组、切换分组和返回全图。 +- **原文引用**:从回答直接定位原始文档中的引用片段。 +- **对话与工具**:无需沙箱即可按需读取附件,未读回答标记、@ 全局搜索、Docker 终端、Lite 本机技能与 MCP 兼容性更新。 +- **管理与集成**:平台用户管理、仅限邀请注册、管理员模型目录、WeMM 向量、TEI/Pinecone/Cohere 重排、Seafile 数据源与繁体中文。 +- **稳定性**:集中修复检索、解析、数据源、Wiki、OAuth 和 CLI。注册模式、空工具列表、数据库迁移与向量重建要求见[升级须知](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3#upgrade-notes)。 + ### v0.8.2 · 2026-09-24 · [版本说明](https://weknora.weixin.qq.com/docs/07-releases/v0.8.2) 智能体可以操作你电脑上的浏览器,知识库可以通过 MCP 接入其他 AI 工具,进行中的对话可以补充要求、分叉或回滚。 @@ -364,7 +374,7 @@ weknora chat "总结一下设计文档" | [配置说明](https://weknora.weixin.qq.com/docs/01-getting-started/04-configuration) | 环境变量与模型配置 | | [常见问题排查](https://weknora.weixin.qq.com/docs/01-getting-started/05-troubleshooting) | 常见问题与解决办法 | | [API 文档](https://weknora.weixin.qq.com/docs/04-api/01-api-overview) | REST API 总览 | -| [版本说明](https://weknora.weixin.qq.com/docs/07-releases/v0.8.2) | 各版本变更详解 | +| [版本说明](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3) | 各版本变更详解 | ## 开发指南 diff --git a/README_JA.md b/README_JA.md index d12df80a..a7dc5c50 100644 --- a/README_JA.md +++ b/README_JA.md @@ -10,7 +10,7 @@

公式サイト ドキュメント - リリース + リリース ライセンス Stars
@@ -138,13 +138,13 @@ docker compose down # サービスを停止 既存のデプロイがあり、新しい release をダウンロードした場合: ```bash -# .env の WEKNORA_VERSION を対象バージョン(例: 0.8.2)に設定、または latest のまま +# .env の WEKNORA_VERSION を対象バージョン(例: 0.8.3)に設定、または latest のまま docker compose pull # WEKNORA_VERSION に一致するイメージを取得 docker compose up -d # 新しいイメージでコンテナを再作成 ``` > [!NOTE] -> `docker compose up -d` のみではローカルキャッシュのイメージが再利用され、Web UI の表示バージョンがダウンロードした release と一致しない場合があります。v0.8.0 からアップグレードする前に[アップグレードの注意事項](https://weknora.weixin.qq.com/docs/07-releases/v0.8.2#upgrade-notes)を確認してください。 +> `docker compose up -d` のみではローカルキャッシュのイメージが再利用され、Web UI の表示バージョンがダウンロードした release と一致しない場合があります。アップグレードする前に[アップグレードの注意事項](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3#upgrade-notes)を確認してください。 ### その他のデプロイ方法 @@ -166,6 +166,16 @@ docker compose up -d # 新しいイメージでコンテナを再作成 ## 最新アップデート +### v0.8.3 · 2026-10-14 · [リリースノート](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3) + +- **画像ギャラリー**:文書内の画像を一覧表示し、出典・説明・OCR・画像属性で絞り込み。 +- **マルチモーダル Embedding**:テキストと画像を同じベクトル空間で扱うモデルに対応。Tencent WeMM-Embedding や Qwen3-VL-Embedding などを利用でき、画像ベクトル検索と対応モデルによる画像リランキングを任意で有効化。 +- **Wiki グラフ**:グループ配置とテーマ説明を改善。グループへのフォーカス、切り替え、全体表示への復帰に対応。 +- **原文引用**:回答から原文の引用箇所へ直接移動。 +- **会話とツール**:サンドボックス不要の添付ファイルのオンデマンド読み取り、未読返信、@ 検索、Docker ターミナル、Lite ローカルスキル、MCP 互換性の改善。 +- **管理と連携**:ユーザー管理、招待による登録、管理者モデルカタログ、WeMM、TEI/Pinecone/Cohere、Seafile、繁体字中国語。 +- **安定性**:検索、解析、同期、Wiki、OAuth、CLI を修正。登録モード、空のツール一覧、DB 移行と再インデックスについては[アップグレード案内](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3#upgrade-notes)を確認してください。 + ### v0.8.2 · 2026-09-24 · [リリースノート](https://weknora.weixin.qq.com/docs/07-releases/v0.8.2) エージェントがあなたのコンピューターのブラウザを操作できるようになり、ナレッジベースを MCP で他の AI ツールに公開でき、実行中の会話に要件を追加したり分岐・巻き戻ししたりできます。 @@ -364,7 +374,7 @@ weknora chat "設計ドキュメントを要約して" | [設定](https://weknora.weixin.qq.com/docs/01-getting-started/04-configuration) | 環境変数とモデル設定 | | [トラブルシューティング](https://weknora.weixin.qq.com/docs/01-getting-started/05-troubleshooting) | よくある問題と解決方法 | | [API ドキュメント](https://weknora.weixin.qq.com/docs/04-api/01-api-overview) | REST API の概要 | -| [リリースノート](https://weknora.weixin.qq.com/docs/07-releases/v0.8.2) | 各バージョンの変更点 | +| [リリースノート](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3) | 各バージョンの変更点 | ## 開発ガイド diff --git a/README_KO.md b/README_KO.md index f33eb8e5..55c4f6fb 100644 --- a/README_KO.md +++ b/README_KO.md @@ -10,7 +10,7 @@

공식 웹사이트 문서 - 릴리스 + 릴리스 라이선스 Stars
@@ -148,13 +148,13 @@ docker compose down # 서비스 중지 기존 배포가 있고 새 release를 다운로드한 경우: ```bash -# .env에서 WEKNORA_VERSION을 대상 버전(예: 0.8.2)으로 설정하거나 latest 유지 +# .env에서 WEKNORA_VERSION을 대상 버전(예: 0.8.3)으로 설정하거나 latest 유지 docker compose pull # WEKNORA_VERSION에 맞는 이미지 가져오기 docker compose up -d # 새 이미지로 컨테이너 재생성 ``` > [!NOTE] -> `docker compose up -d`만 실행하면 로컬 캐시 이미지가 재사용되어 Web UI 버전이 다운로드한 release와 일치하지 않을 수 있습니다. v0.8.0에서 업그레이드하기 전에 [업그레이드 안내](https://weknora.weixin.qq.com/docs/07-releases/v0.8.2#upgrade-notes)를 확인하세요. +> `docker compose up -d`만 실행하면 로컬 캐시 이미지가 재사용되어 Web UI 버전이 다운로드한 release와 일치하지 않을 수 있습니다. 업그레이드하기 전에 [업그레이드 안내](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3#upgrade-notes)를 확인하세요. ### 기타 배포 방식 @@ -176,6 +176,16 @@ docker compose up -d # 새 이미지로 컨테이너 재생성 ## 최신 업데이트 +### v0.8.3 · 2026-10-14 · [릴리스 노트](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3) + +- **이미지 갤러리**: 문서 이미지를 모아 보고 출처, 설명, OCR 및 이미지 속성으로 필터링. +- **멀티모달 Embedding**: 텍스트와 이미지를 같은 벡터 공간으로 인코딩하는 모델 지원. Tencent WeMM-Embedding, Qwen3-VL-Embedding 등을 사용할 수 있으며 이미지 벡터 검색과 호환 모델의 이미지 리랭킹을 선택적으로 활성화. +- **Wiki 그래프**: 그룹 배치와 주제 설명을 개선하고 그룹 집중 보기, 그룹 전환 및 전체 그래프 복귀를 지원. +- **원문 인용**: 답변에서 원문의 인용 부분으로 바로 이동. +- **대화와 도구**: 샌드박스 없이 첨부 파일을 필요할 때 읽기, 읽지 않은 답변 표시, @ 검색, Docker 터미널, Lite 로컬 스킬과 MCP 호환성 개선. +- **관리와 연동**: 플랫폼 사용자 관리, 초대 등록 모드, 관리자 모델 카탈로그, WeMM, TEI/Pinecone/Cohere, Seafile과 번체 중국어. +- **안정성**: 검색, 파싱, 동기화, Wiki, OAuth와 CLI 수정. 등록 모드, 빈 도구 목록, DB 마이그레이션과 재색인은 [업그레이드 안내](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3#upgrade-notes)를 확인하세요. + ### v0.8.2 · 2026-09-24 · [릴리스 노트](https://weknora.weixin.qq.com/docs/07-releases/v0.8.2) 에이전트가 사용자 컴퓨터의 브라우저를 조작할 수 있고, 지식베이스를 MCP로 다른 AI 도구에 공개할 수 있으며, 진행 중인 대화에 요구 사항을 추가하거나 분기·되감기할 수 있습니다. @@ -374,7 +384,7 @@ weknora chat "설계 문서를 요약해 줘" | [설정](https://weknora.weixin.qq.com/docs/01-getting-started/04-configuration) | 환경 변수와 모델 설정 | | [문제 해결 FAQ](https://weknora.weixin.qq.com/docs/01-getting-started/05-troubleshooting) | 자주 발생하는 문제와 해결 방법 | | [API 문서](https://weknora.weixin.qq.com/docs/04-api/01-api-overview) | REST API 개요 | -| [릴리스 노트](https://weknora.weixin.qq.com/docs/07-releases/v0.8.2) | 버전별 변경 사항 | +| [릴리스 노트](https://weknora.weixin.qq.com/docs/07-releases/v0.8.3) | 버전별 변경 사항 | ## 개발자 가이드 diff --git a/VERSION b/VERSION index 100435be..ee94dd83 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.2 +0.8.3 diff --git a/docs/docs.go b/docs/docs.go index 156d80be..5c5bd210 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -782,31 +782,47 @@ const docTemplate = `{ } } }, - "/api/v1/knowledge/{id}/spans": { + "/artifacts": { "get": { - "description": "返回该知识在解析流水线的 trace tree(root → stage → subspan):每段状态、耗时、input/output、错误码、langfuse_trace_id。支持 ?attempt=N 查看历史尝试;不传则返回最新尝试。前端用于渲染时间线 + 多模态/embedding 子节点 + 一键跳转 Langfuse。", - "consumes": [ - "application/json" + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } ], + "description": "跨会话列出当前用户可见会话中技能生成的文件,每个文件只返回最新版本(不含存储 URL)", "produces": [ "application/json" ], "tags": [ - "知识管理" + "会话" ], - "summary": "获取知识文档解析的 Span 树(含历史尝试)", + "summary": "列出我的产物", "parameters": [ { "type": "string", - "description": "知识ID", - "name": "id", - "in": "path", - "required": true + "description": "按文件名过滤", + "name": "keyword", + "in": "query" + }, + { + "type": "string", + "description": "逗号分隔的扩展名,如 .pdf,.pptx", + "name": "file_types", + "in": "query" }, { "type": "integer", - "description": "指定尝试号;省略=最新", - "name": "attempt", + "description": "页码", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "每页数量(最大 100)", + "name": "page_size", "in": "query" } ], @@ -819,6 +835,65 @@ const docTemplate = `{ } } } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除产物库中的一个文件。产物库一行代表一个文件的最新版本,默认连同该文件在本会话中的所有历史版本一并删除", + "produces": [ + "application/json" + ], + "tags": [ + "会话" + ], + "summary": "删除产物库中的文件", + "parameters": [ + { + "type": "string", + "description": "会话ID", + "name": "session_id", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "消息ID", + "name": "message_id", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "产物在消息中的位置", + "name": "index", + "in": "query", + "required": true + }, + { + "type": "boolean", + "description": "是否删除所有版本,默认 true", + "name": "all_versions", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } } }, "/auth/auto-setup": { @@ -1345,7 +1420,7 @@ const docTemplate = `{ }, "/auth/register-by-invite": { "post": { - "description": "通过 Owner 生成的共享邀请链接 token 完成注册,绕过 invite_only 模式拦截。\n注册者自填邮箱(与 token 不绑定);注册成功后自动加入对应空间。", + "description": "通过共享邀请链接 token 完成注册,仅 self_serve / invite_register 模式允许。\n注册者自填邮箱(与 token 不绑定);注册成功后自动加入对应空间。", "consumes": [ "application/json" ], @@ -1380,6 +1455,12 @@ const docTemplate = `{ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" } }, + "403": { + "description": "注册功能已禁用", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + }, "409": { "description": "邮箱已注册", "schema": { @@ -2666,7 +2747,7 @@ const docTemplate = `{ "ApiKeyAuth": [] } ], - "description": "更新指定 IM 渠道的名称、模式、知识库、凭证或启用状态", + "description": "更新指定 IM 渠道的名称、模式、回复语言、知识库、凭证或启用状态", "consumes": [ "application/json" ], @@ -2686,7 +2767,7 @@ const docTemplate = `{ "required": true }, { - "description": "更新字段(name/mode/output_mode/knowledge_base_id/credentials/enabled)", + "description": "更新字段(含 locale)", "name": "request", "in": "body", "required": true, @@ -4939,7 +5020,7 @@ const docTemplate = `{ "ApiKeyAuth": [] } ], - "description": "在知识库中执行向量和关键词混合搜索。推荐使用 POST;GET 携带 JSON 请求体仍受支持(兼容旧客户端)。", + "description": "底层召回:向量+关键词混合检索,默认不 rerank(可用 rerank 字段开启);一般检索请用 /knowledge-search。推荐 POST,GET 带 JSON 体仅兼容旧客户端。", "consumes": [ "application/json" ], @@ -5004,7 +5085,7 @@ const docTemplate = `{ "ApiKeyAuth": [] } ], - "description": "在知识库中执行向量和关键词混合搜索。推荐使用 POST;GET 携带 JSON 请求体仍受支持(兼容旧客户端)。", + "description": "底层召回:向量+关键词混合检索,默认不 rerank(可用 rerank 字段开启);一般检索请用 /knowledge-search。推荐 POST,GET 带 JSON 体仅兼容旧客户端。", "consumes": [ "application/json" ], @@ -5061,6 +5142,166 @@ const docTemplate = `{ } } }, + "/knowledge-bases/{id}/images": { + "get": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "浏览某知识库内的全部图片资产,支持关键字搜索(caption/OCR 文本)、按图片属性筛选(attr_filters / attr_rules)与排序分页。", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "knowledge" + ], + "summary": "列出知识库图片资产", + "parameters": [ + { + "type": "string", + "description": "知识库 ID", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "页码,默认 1", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "每页数量,默认 20,最大 1000", + "name": "page_size", + "in": "query" + }, + { + "type": "string", + "description": "关键字,对 search_in 指定字段做不区分大小写的子串匹配", + "name": "keyword", + "in": "query" + }, + { + "type": "string", + "description": "参与搜索的属性 ID(逗号分隔);须为 in_searchfield=true", + "name": "search_in", + "in": "query" + }, + { + "type": "string", + "description": "排序属性 ID;须为 in_sortfield=true,默认 created_at", + "name": "sort_by", + "in": "query" + }, + { + "type": "string", + "description": "排序方向:asc / desc,默认 desc", + "name": "sort_order", + "in": "query" + }, + { + "type": "boolean", + "description": "仅包含启用状态的图片", + "name": "is_enabled", + "in": "query" + }, + { + "type": "string", + "description": "来源文档 ID 列表(逗号分隔,最多 50 个),仅返回这些文档的图片", + "name": "knowledge_ids", + "in": "query" + }, + { + "type": "string", + "description": "属性筛选 JSON,同一属性多值 OR、属性间 AND", + "name": "attr_filters", + "in": "query" + }, + { + "type": "string", + "description": "属性逐值裁决 JSON(off 隐藏 / on 强制显示,on 优先)", + "name": "attr_rules", + "in": "query" + } + ], + "responses": { + "200": { + "description": "图片资产分页列表", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "请求参数错误", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "与 GET /images 同义,筛选参数改经 JSON body 传递:knowledge_ids 不再受 URL 长度限制(上限 1000),供来源文档全选使用。", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "knowledge" + ], + "summary": "列出知识库图片资产(body 版)", + "parameters": [ + { + "type": "string", + "description": "知识库 ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "筛选参数(与 GET /images 同名参数同义)", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/internal_handler.imageListRequestBody" + } + } + ], + "responses": { + "200": { + "description": "图片资产分页列表", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "请求参数错误", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } + } + }, "/knowledge-bases/{id}/knowledge": { "get": { "security": [ @@ -5155,6 +5396,18 @@ const docTemplate = `{ "description": "为 true 时同时返回子文件夹内的文档", "name": "folder_recursive", "in": "query" + }, + { + "type": "string", + "description": "排序字段: updated_at/created_at/file_name,默认 created_at", + "name": "sort_by", + "in": "query" + }, + { + "type": "string", + "description": "排序方向: asc/desc,默认 desc", + "name": "sort_order", + "in": "query" } ], "responses": { @@ -5747,6 +6000,50 @@ const docTemplate = `{ } } }, + "/knowledge-bases/{id}/profile/generate": { + "post": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "基于文档画像聚合,立即重新生成知识库的 AI 描述(不覆盖手写描述)", + "produces": [ + "application/json" + ], + "tags": [ + "知识库" + ], + "summary": "生成知识库描述", + "parameters": [ + { + "type": "string", + "description": "知识库ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "生成的知识库画像", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "知识库类型不支持或未配置模型", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } + } + }, "/knowledge-bases/{id}/shares": { "get": { "security": [ @@ -6277,7 +6574,7 @@ const docTemplate = `{ "ApiKeyAuth": [] } ], - "description": "在知识库中搜索(不使用LLM总结)", + "description": "在知识库中搜索(不使用LLM总结)。与产品内问答使用同一检索流程(召回、rerank、合并),外部检索首选;可覆盖召回参数与 rerank", "consumes": [ "application/json" ], @@ -7265,6 +7562,53 @@ const docTemplate = `{ } } }, + "/knowledge/{id}/spans": { + "get": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "返回该知识在解析流水线的 trace tree(root → stage → subspan):每段状态、耗时、input/output、错误码、langfuse_trace_id。支持 ?attempt=N 查看历史尝试;不传则返回最新尝试。前端用于渲染时间线 + 多模态/embedding 子节点 + 一键跳转 Langfuse。", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "知识管理" + ], + "summary": "获取知识文档解析的 Span 树(含历史尝试)", + "parameters": [ + { + "type": "string", + "description": "知识ID", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "指定尝试号;省略=最新", + "name": "attempt", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, "/knowledgebase/{kb_id}/wiki/auto-fix": { "post": { "security": [ @@ -8683,6 +9027,20 @@ const docTemplate = `{ "MCP服务" ], "summary": "获取MCP服务列表", + "parameters": [ + { + "type": "string", + "description": "Agent ID; needs agent_source_tenant_id", + "name": "agent_id", + "in": "query" + }, + { + "type": "integer", + "description": "Shared agent source workspace", + "name": "agent_source_tenant_id", + "in": "query" + } + ], "responses": { "200": { "description": "MCP服务列表", @@ -8696,6 +9054,12 @@ const docTemplate = `{ "schema": { "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" } + }, + "403": { + "description": "无权使用该共享智能体", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } } } }, @@ -10824,6 +11188,65 @@ const docTemplate = `{ } } }, + "/models/catalog/resolve": { + "get": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "根据厂商、模型名、Base URL 与 extra_config 返回目录解析结果(协议、思考等级、上下文等),供模型编辑器实时展示", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "模型管理" + ], + "summary": "解析模型的有效接入配置", + "parameters": [ + { + "type": "string", + "description": "厂商标识", + "name": "provider", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "模型名", + "name": "model", + "in": "query" + }, + { + "type": "string", + "description": "Base URL", + "name": "base_url", + "in": "query" + }, + { + "type": "string", + "description": "模型类型", + "name": "model_type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "解析结果", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, "/models/providers": { "get": { "security": [ @@ -10834,7 +11257,7 @@ const docTemplate = `{ "ApiKeyAuth": [] } ], - "description": "根据模型类型获取支持的厂商列表及配置信息", + "description": "根据模型类型获取支持的厂商定义(含图标、默认地址、额外字段、内置模型目录与思考能力)", "consumes": [ "application/json" ], @@ -10848,7 +11271,7 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "description": "模型类型 (chat, embedding, rerank, vllm)", + "description": "模型类型 (chat, embedding, rerank, vllm, asr)", "name": "model_type", "in": "query" } @@ -11052,6 +11475,68 @@ const docTemplate = `{ } } }, + "/models/{id}/copy": { + "post": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "复制模型配置。name 与源模型一致,凭证从已存记录复制,不接受客户端重传。", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "模型管理" + ], + "summary": "复制模型", + "parameters": [ + { + "type": "string", + "description": "源模型ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "副本展示名", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/internal_handler.CopyModelRequest" + } + } + ], + "responses": { + "201": { + "description": "复制的模型", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "请求参数错误", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + }, + "404": { + "description": "模型不存在", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } + } + }, "/organizations": { "get": { "security": [ @@ -13800,6 +14285,67 @@ const docTemplate = `{ "responses": {} } }, + "/sessions/{session_id}/messages/{message_id}/artifacts/{index}": { + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除某条 assistant 消息生成的单个文件;all_versions=true 时连同本会话中该文件的所有历史版本一并删除", + "produces": [ + "application/json" + ], + "tags": [ + "会话" + ], + "summary": "删除会话中的产物文件", + "parameters": [ + { + "type": "string", + "description": "会话ID", + "name": "session_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "消息ID", + "name": "message_id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "产物在消息中的位置", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "是否删除该文件的所有版本", + "name": "all_versions", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } + } + }, "/sessions/{session_id}/messages/{message_id}/artifacts/{index}/download": { "get": { "responses": {} @@ -13954,6 +14500,80 @@ const docTemplate = `{ } } }, + "/sessions/{session_id}/rewind": { + "post": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "回滚当前会话到指定用户或助手消息:删除其后消息,可到达时 git reset 工作区。", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "会话" + ], + "summary": "回滚会话", + "parameters": [ + { + "type": "string", + "description": "会话 ID", + "name": "session_id", + "in": "path", + "required": true + }, + { + "description": "回滚请求", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/internal_handler_session.RewindSessionRequest" + } + } + ], + "responses": { + "200": { + "description": "回滚结果", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "请求参数错误 / 回滚点角色不支持", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + }, + "404": { + "description": "会话或消息不存在", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + }, + "409": { + "description": "会话正在生成中 / 无检查点 / 沙箱已更换", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + }, + "500": { + "description": "工作区回滚失败", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } + } + }, "/sessions/{session_id}/steer": { "post": { "security": [ @@ -14325,9 +14945,21 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "description": "Sandbox config ID", + "description": "Sandbox config ID; ignored for a shared agent", "name": "sandbox_config_id", "in": "query" + }, + { + "type": "string", + "description": "Agent ID; needs agent_source_tenant_id", + "name": "agent_id", + "in": "query" + }, + { + "type": "integer", + "description": "Shared agent source workspace", + "name": "agent_source_tenant_id", + "in": "query" } ], "responses": { @@ -14337,6 +14969,12 @@ const docTemplate = `{ "type": "object", "additionalProperties": true } + }, + "403": { + "description": "无权使用该共享智能体", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } } } } @@ -15189,6 +15827,198 @@ const docTemplate = `{ } } }, + "/system/admin/model-catalog": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "System administrator JWT only; API keys are not accepted. Returns built-in, deployment and effective\ncatalogs, the current overlay, version/baseline tokens, and the latest 20 published revisions.", + "produces": [ + "application/json" + ], + "tags": [ + "系统管理" + ], + "summary": "Get the system model catalog", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogState" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "403": { + "description": "Forbidden", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "503": { + "description": "Service Unavailable", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "System administrator JWT only; API keys are not accepted. Validates and publishes a new overlay\nrevision using the current version and baseline. Stale values return 409. To restore a historical\nconfiguration, submit its overlay with the current version and baseline.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "系统管理" + ], + "summary": "Publish a model catalog overlay", + "parameters": [ + { + "description": "Version, baseline and overlay object (max 1 MiB)", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogState" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "403": { + "description": "Forbidden", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "409": { + "description": "Conflict", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, + "/system/admin/model-catalog/preview": { + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "System administrator JWT only; API keys are not accepted. Validates the overlay without publishing\nit. Supply the current version and baseline; stale values return 409. The response contains the\ncandidate effective catalog and normalized overlay; history, builtin and deployment are null.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "系统管理" + ], + "summary": "Preview a model catalog overlay", + "parameters": [ + { + "description": "Version, baseline and overlay object (max 1 MiB)", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogState" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "403": { + "description": "Forbidden", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "409": { + "description": "Conflict", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, "/system/admin/promote": { "post": { "description": "Grant system administrator privileges to a user (SystemAdmin only).\nIdempotent: re-promoting an existing system admin returns 200 with no DB write.\nIdentify the user by email (preferred for human operators) or user_id (UUID, for API clients).", @@ -15617,6 +16447,49 @@ const docTemplate = `{ } } }, + "/system/admin/users": { + "get": { + "description": "Retrieve a paginated list of every user across tenants (SystemAdmin only).\nSupports ` + "`" + `offset` + "`" + ` (default 0) and ` + "`" + `limit` + "`" + ` (default 50, max 200).\nPassword/hashes are never serialised — only the redacted UserInfo shape.", + "produces": [ + "application/json" + ], + "tags": [ + "System Admin" + ], + "summary": "List all platform users", + "parameters": [ + { + "type": "integer", + "default": 0, + "description": "Page offset", + "name": "offset", + "in": "query" + }, + { + "type": "integer", + "default": 50, + "description": "Page size (max 200)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Users retrieved successfully", + "schema": { + "$ref": "#/definitions/internal_handler.ListAllUsersResponse" + } + }, + "403": { + "description": "Forbidden: not a system admin", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, "/system/admin/users/create": { "post": { "description": "Provision a new local user account (SystemAdmin only).\nWhen ` + "`" + `password` + "`" + ` is omitted or null, a cryptographically random\npassword is generated (OIDC-style crypto/rand + base64url)\nand returned once in the response body. Any provided value,\nincluding empty string, is policy-checked. Tenant provisioning\nfollows the shared auth.default_tenant_mode policy.", @@ -15741,6 +16614,55 @@ const docTemplate = `{ } } }, + "/system/admin/users/status": { + "post": { + "description": "Disable revokes the target's active sessions immediately.\nSelf-disable and disabling the last active system administrator are rejected.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "System Admin" + ], + "summary": "Enable or disable a user account", + "parameters": [ + { + "description": "Account status request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/internal_handler.SetUserStatusRequest" + } + } + ], + "responses": { + "200": { + "description": "Status updated", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "Self-disable / last-admin guard", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "404": { + "description": "User not found", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, "/system/capabilities": { "get": { "description": "返回当前部署版本及实际注册的后端路由所对应的功能能力;仅 supported=false 表示入口应隐藏", @@ -18046,9 +18968,183 @@ const docTemplate = `{ } } } + }, + "/wiki-search": { + "post": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "Cross-KB wiki search using the same POSIX regex ranking as single-KB wiki search", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Wiki" + ], + "summary": "Cross-KB wiki search", + "parameters": [ + { + "description": "Wiki search request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/internal_handler.SearchWikiRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } + } } }, "definitions": { + "github_com_Tencent_WeKnora_internal_application_service.CatalogProviderView": { + "type": "object", + "properties": { + "api": { + "type": "string" + }, + "id": { + "type": "string" + }, + "model_thinking_levels": { + "description": "ModelThinkingLevels lists, per chat model id, the levels offered once\nthinking is enabled, resolved against the vendor map and protocol so\nthe console does not re-implement level inheritance.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_models_api.ReasoningEffort" + } + } + }, + "model_types": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelType" + } + }, + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_models.ModelSpec" + } + }, + "name": { + "type": "string" + }, + "settings": { + "type": "object", + "additionalProperties": {} + }, + "vendor_thinking_levels": { + "description": "VendorThinkingLevels is what a chat model without its own map offers.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_models_api.ReasoningEffort" + } + } + } + }, + "github_com_Tencent_WeKnora_internal_application_service.CatalogRevision": { + "type": "object", + "properties": { + "overlay": { + "type": "object" + }, + "updated_at": { + "type": "string" + }, + "updated_by": { + "type": "string" + }, + "version": { + "type": "integer" + } + } + }, + "github_com_Tencent_WeKnora_internal_application_service.CatalogState": { + "type": "object", + "properties": { + "applied_version": { + "type": "integer" + }, + "baseline": { + "type": "string" + }, + "builtin": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogProviderView" + } + }, + "deployment": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogProviderView" + } + }, + "deployment_error": { + "type": "string" + }, + "effective": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogProviderView" + } + }, + "history": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogRevision" + } + }, + "overlay": { + "type": "object" + }, + "sync_error": { + "type": "string" + }, + "version": { + "type": "integer" + } + } + }, + "github_com_Tencent_WeKnora_internal_application_service.CatalogUpdate": { + "type": "object", + "properties": { + "baseline": { + "type": "string" + }, + "overlay": { + "type": "object" + }, + "version": { + "type": "integer" + } + } + }, "github_com_Tencent_WeKnora_internal_application_service.WikiLintIssue": { "type": "object", "properties": { @@ -18324,6 +19420,152 @@ const docTemplate = `{ } } }, + "github_com_Tencent_WeKnora_internal_models.ModelCost": { + "type": "object", + "properties": { + "cache_read": { + "type": "number" + }, + "cache_write": { + "type": "number" + }, + "currency": { + "type": "string" + }, + "input": { + "type": "number" + }, + "output": { + "type": "number" + } + } + }, + "github_com_Tencent_WeKnora_internal_models.ModelSpec": { + "type": "object", + "properties": { + "aliases": { + "description": "Aliases are additional ids that resolve to this entry (dated\nsnapshots, vendor-prefixed names on gateways).", + "type": "array", + "items": { + "type": "string" + } + }, + "api": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_models_api.API" + }, + "compat": { + "description": "Compat is the protocol-specific overlay for this model (flat object,\nfields depend on API). Decoded lazily by Resolve.", + "type": "array", + "items": { + "type": "integer" + } + }, + "context_window": { + "type": "integer" + }, + "cost": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_models.ModelCost" + }, + "deprecated": { + "description": "Deprecated hides the entry from pickers but keeps resolution working.", + "type": "boolean" + }, + "dimension": { + "description": "Dimension is the embedding vector width (embedding entries only).", + "type": "integer" + }, + "id": { + "type": "string" + }, + "input": { + "description": "Input lists accepted modalities: text, image, audio, video.", + "type": "array", + "items": { + "type": "string" + } + }, + "match": { + "description": "Match is a case-insensitive glob (\"gpt-5*\", \"*deepseek-r1*\") that lets\none entry describe a family. Exact ids and aliases win over patterns;\namong patterns the longest literal prefix wins.", + "type": "string" + }, + "max_output_tokens": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "reasoning": { + "description": "Reasoning reports whether the model can emit thinking at all.", + "type": "boolean" + }, + "source": { + "description": "Source is the documentation URL the facts were taken from.", + "type": "string" + }, + "thinking_levels": { + "description": "ThinkingLevels maps protocol-neutral levels to vendor values; missing\nkeys inherit the vendor map. See api.ThinkingLevelMap.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_models_api.ThinkingLevelMap" + } + ] + }, + "type": { + "description": "Type is the WeKnora model type this entry describes. Chat models with\nimage input are still KnowledgeQA; the UI derives VLM eligibility from\nInput. Embedding / Rerank / ASR entries exist for the model picker.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelType" + } + ] + } + } + }, + "github_com_Tencent_WeKnora_internal_models_api.API": { + "type": "string", + "enum": [ + "openai-completions", + "openai-responses", + "anthropic-messages", + "google-generative-ai", + "ollama" + ], + "x-enum-varnames": [ + "APIOpenAICompletions", + "APIOpenAIResponses", + "APIAnthropicMessages", + "APIGoogleGenerativeAI", + "APIOllama" + ] + }, + "github_com_Tencent_WeKnora_internal_models_api.ReasoningEffort": { + "type": "string", + "enum": [ + "off", + "auto", + "minimal", + "low", + "medium", + "high", + "xhigh", + "max" + ], + "x-enum-varnames": [ + "ReasoningOff", + "ReasoningAuto", + "ReasoningMinimal", + "ReasoningLow", + "ReasoningMedium", + "ReasoningHigh", + "ReasoningXHigh", + "ReasoningMax" + ] + }, + "github_com_Tencent_WeKnora_internal_models_api.ThinkingLevelMap": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "github_com_Tencent_WeKnora_internal_models_limiter.RuntimeStat": { "type": "object", "properties": { @@ -18407,6 +19649,13 @@ const docTemplate = `{ "description": "ReasoningContent stores the OpenAI-protocol reasoning_content emitted by the\nmodel in this round. Persisted on AgentStep so cross-turn replay can put it\nback on the assistant message — required by MiMo / DeepSeek V3.2+ thinking\nmode, ignored by providers that don't recognize the field.", "type": "string" }, + "reasoning_metadata": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ProviderMetadata" + }, + "reasoning_signature": { + "description": "ReasoningSignature / ReasoningMetadata are the provider artifacts that\nmust accompany ReasoningContent on replay (Anthropic signatures,\nOpenAI Responses encrypted reasoning items).", + "type": "string" + }, "thought": { "description": "LLM's reasoning/thinking (Think phase)", "type": "string" @@ -18422,6 +19671,10 @@ const docTemplate = `{ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ToolCall" } }, + "truncated": { + "description": "Truncated marks the round the completion-token cap cut off. It rides in\nthe agent_steps JSON so a reloaded, shared or re-opened conversation can\nstill show that the answer stops mid-sentence by design, rather than\nlooking finished. Live streaming carries the same fact on the answer\nevent; this is what survives the round trip.", + "type": "boolean" + }, "user_messages_before": { "description": "UserMessagesBefore records consumed steer rows in delivery order, before\nthis model response. Unlike timestamps, this remains unambiguous on replay.", "type": "array", @@ -19170,6 +20423,10 @@ const docTemplate = `{ } ] }, + "reasoning_effort": { + "description": "ReasoningEffort selects the thinking intensity (off | auto | minimal |\nlow | medium | high | xhigh | max). Empty keeps the boolean Thinking\nsemantics: true means \"auto\". See internal/models/api.ReasoningEffort.", + "type": "string" + }, "rerank_model_id": { "description": "ReRank model ID for retrieval", "type": "string" @@ -19736,6 +20993,22 @@ const docTemplate = `{ } } }, + "github_com_Tencent_WeKnora_internal_types.GalleryUserPrefs": { + "type": "object", + "properties": { + "mode": { + "description": "Mode is \"all\" (every search-eligible field active) or \"custom\"\n(per-field Status governs). Empty = \"all\".", + "type": "string" + }, + "status": { + "description": "Status maps a namespaced attribute id (\"builtin:caption\") to\n\"on\"/\"off\". Only consulted in custom mode; an unrecorded field is\noff. Source-declared on/off does not exist — activation is always\nthe user's own record.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, "github_com_Tencent_WeKnora_internal_types.GraphNode": { "type": "object", "properties": { @@ -19770,9 +21043,60 @@ const docTemplate = `{ } } }, + "github_com_Tencent_WeKnora_internal_types.ImageActionsConfig": { + "type": "object", + "properties": { + "ocr": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageOCRAction" + } + } + }, + "github_com_Tencent_WeKnora_internal_types.ImageAttrCondition": { + "type": "object", + "properties": { + "is": { + "type": "string" + }, + "prop": { + "type": "string" + } + } + }, + "github_com_Tencent_WeKnora_internal_types.ImageOCRAction": { + "type": "object", + "properties": { + "on": { + "description": "On is the list of attribute conditions that enable OCR. Matching any one\nturns OCR on.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageAttrCondition" + } + }, + "on_unobserved": { + "description": "OnUnobserved is the OCR decision used when the observation does not\nanswer for one of the attributes the policy reads — the attribute is\nabsent because the model skipped the line, or because the value it wrote\nwas not one of the allowed ones. The default is true: an incomplete\nobservation keeps extracting, so a missed block of text costs one extra\ncall instead of being lost. Turn it off only with a model reliable enough\nto answer every attribute line.", + "type": "boolean" + } + } + }, "github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig": { "type": "object", "properties": { + "image_actions": { + "description": "ImageActions overrides the built-in attribute→work table (see\nDefaultImageActions). A nil value keeps the conservative default: run OCR\nfor block text, data visuals, and unobserved images.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageActionsConfig" + } + ] + }, + "image_attrs_enabled": { + "description": "ImageAttrsEnabled turns the attribute-observed image pipeline on for this\nknowledge base. It is off by default on purpose, so upgrading an\nexisting deployment never changes what happens to documents already\nbeing ingested: with it off every image is described and OCR'd exactly\nas before. When on, the describe round also observes image attributes and\nthe attribute policy decides whether OCR runs for it. A single upload can\noverride it per document through\nKnowledgeProcessOverrides.ImageAttrsEnabled.", + "type": "boolean" + }, + "image_vector_enabled": { + "description": "ImageVectorEnabled lets a knowledge base whose embedding model takes\nimages index each image by its own vector and recall it with one. It\nis off by default on purpose: a model that takes images is also used\nfor plain text, and turning this on costs an embedding call per image\nand widens vector recall. Existing knowledge bases stay off after an\nupgrade because the stored JSON has no such key.", + "type": "boolean" + }, "model_id": { "description": "Model ID", "type": "string" @@ -19876,7 +21200,7 @@ const docTemplate = `{ ], "properties": { "representative_user_id": { - "description": "RepresentativeUserID identifies the user attached to the OTM row for\ndisplay/audit. Optional: when unset, the handler picks a stable default\n(the user from the legacy UserID field, or the workspace's owner).", + "description": "RepresentativeUserID is accepted for compatibility and ignored: a\ndirect add attaches no user of the enrolled workspace, since the\ninviter must not choose whose details the roster shows.", "type": "string" }, "role": { @@ -19892,7 +21216,7 @@ const docTemplate = `{ "type": "integer" }, "user_id": { - "description": "UserID is retained for backward compatibility. When set without\nTenantID, the handler resolves the user's TenantID and uses this\nuser as the representative.", + "description": "UserID is retained for backward compatibility. When set without\nTenantID, the handler resolves the user's TenantID.", "type": "string" } } @@ -20047,6 +21371,14 @@ const docTemplate = `{ } ] }, + "generated_profile": { + "description": "GeneratedProfile is the machine-generated description: a gist, merged\ntopics, typical questions and the aggregate snapshot they came from. It\nnever overwrites the user-authored Description; both are shown to agents.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfile" + } + ] + }, "id": { "description": "Unique identifier of the knowledge base", "type": "string" @@ -20095,6 +21427,14 @@ const docTemplate = `{ "description": "ProcessingCount indicates the number of knowledge items being processed (for document type knowledge bases)", "type": "integer" }, + "profile_config": { + "description": "ProfileConfig controls automatic generation of the knowledge-base\ndescription from per-document profiles (document knowledge bases only).", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileConfig" + } + ] + }, "question_generation_config": { "description": "QuestionGenerationConfig stores question generation configuration for document knowledge bases", "allOf": [ @@ -20193,7 +21533,7 @@ const docTemplate = `{ ] }, "image_processing_config": { - "description": "Image processing configuration", + "description": "Image processing configuration.\n\nnil means \"no change\" when updating, the same contract IndexingStrategy\nuses. A request that does not mention this field must leave the image\nsettings alone: the attribute-observation switch and the attribute policy\nare things a knowledge base accumulates, and a client that predates them\nwould otherwise reset the lot on any save. Sending an object — empty\nincluded — replaces the whole configuration.", "allOf": [ { "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig" @@ -20208,6 +21548,14 @@ const docTemplate = `{ } ] }, + "profile_config": { + "description": "ProfileConfig controls optional automatic knowledge-base description\ngeneration. nil means \"no change\" when updating.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileConfig" + } + ] + }, "wiki_config": { "description": "Wiki configuration (only for wiki-enabled knowledge bases)", "allOf": [ @@ -20218,6 +21566,128 @@ const docTemplate = `{ } } }, + "github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfile": { + "type": "object", + "properties": { + "aggregate_hash": { + "description": "AggregateHash identifies the aggregate the gist was generated from. A\nmismatch with the live aggregate means the text is stale.", + "type": "string" + }, + "error": { + "description": "Error holds the last generation error when Status is failed.", + "type": "string" + }, + "generated_at": { + "description": "GeneratedAt records when the text was produced.", + "type": "string" + }, + "gist": { + "description": "Gist is a short statement of what the knowledge base covers.", + "type": "string" + }, + "model_id": { + "description": "ModelID records which chat model produced the text.", + "type": "string" + }, + "stats": { + "description": "Stats is the aggregate snapshot the text was generated from.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileStats" + } + ] + }, + "status": { + "description": "Status is one of the KnowledgeBaseProfileStatus* values.", + "type": "string" + }, + "topics": { + "description": "Topics is the merged topic list (at most KnowledgeBaseProfileMaxTopics).", + "type": "array", + "items": { + "type": "string" + } + }, + "typical_questions": { + "description": "TypicalQuestions lists questions this knowledge base can answer.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileConfig": { + "type": "object", + "properties": { + "custom_instructions": { + "description": "CustomInstructions is appended to the stable system prompt, e.g. the\naudience the description should address or terms to keep.", + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "model_id": { + "description": "ModelID overrides the chat model; empty falls back to the KB summary model.", + "type": "string" + } + } + }, + "github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileStats": { + "type": "object", + "properties": { + "doc_types": { + "description": "DocTypes counts documents per model-assigned document type.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.NamedCount" + } + }, + "document_count": { + "description": "DocumentCount is the number of eligible documents at generation time.", + "type": "integer" + }, + "earliest_at": { + "description": "EarliestAt and LatestAt bound document creation times.", + "type": "string" + }, + "file_types": { + "description": "FileTypes counts documents per file extension.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.NamedCount" + } + }, + "folders": { + "description": "Folders lists the top-level folder names present.", + "type": "array", + "items": { + "type": "string" + } + }, + "latest_at": { + "type": "string" + }, + "profiled_count": { + "description": "ProfiledCount is how many of them carried a document profile.", + "type": "integer" + }, + "raw_topics": { + "description": "RawTopics counts documents per normalized topic keyword before merging.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.NamedCount" + } + }, + "tags": { + "description": "Tags counts documents per knowledge-base tag.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.NamedCount" + } + } + } + }, "github_com_Tencent_WeKnora_internal_types.KnowledgeBaseShareResponse": { "type": "object", "properties": { @@ -20341,6 +21811,22 @@ const docTemplate = `{ "graph_enabled": { "type": "boolean" }, + "image_actions": { + "description": "ImageActions overrides rows of the attribute-\u003ework table for this document\n(merged per action key on top of the knowledge base's table).\nnil keeps the knowledge base's setting.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageActionsConfig" + } + ] + }, + "image_attrs_enabled": { + "description": "ImageAttrsEnabled overrides the knowledge base's attribute-observed image\npipeline switch for this one document. nil keeps the knowledge base's\nsetting.", + "type": "boolean" + }, + "image_vector_enabled": { + "description": "ImageVectorEnabled overrides image vector indexing for this document.\nIt does not change the KB-wide retrieval setting or embedding model.", + "type": "boolean" + }, "parser_engine_overrides": { "description": "ParserEngineOverrides passes key-value configuration to docreader parsers\n(e.g. pdf_force_scanned=true). Merged with workspace-level overrides in the\nparse pipeline; per-upload values take priority on conflict.", "type": "object", @@ -20747,6 +22233,20 @@ const docTemplate = `{ "MatchTypeDataAnalysis" ] }, + "github_com_Tencent_WeKnora_internal_types.MatchedImage": { + "type": "object", + "properties": { + "chunk_id": { + "type": "string" + }, + "knowledge_base_id": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, "github_com_Tencent_WeKnora_internal_types.Membership": { "type": "object", "properties": { @@ -20864,7 +22364,7 @@ const docTemplate = `{ } }, "artifacts": { - "description": "Skill-generated files produced during this assistant turn (assistant messages only).\nPopulated by ArtifactCollector after the sandbox finishes, referenced by the\nartifact download endpoint. Empty for user messages and turns without skills.", + "description": "Skill-generated files produced during this assistant turn (assistant messages only).\nPopulated by ArtifactCollector after the sandbox finishes, referenced by the\nartifact download endpoint. Empty for user messages and turns without skills.\n\nStored in the message_artifacts table, not on the message row: the message\nrepository loads it with every message it returns and writes it whenever it\nis non-nil on create or update. A nil slice leaves the stored rows alone.", "type": "array", "items": { "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MessageArtifact" @@ -20990,6 +22490,10 @@ const docTemplate = `{ "description": "When WeKnora persisted the blob", "type": "string" }, + "deleted_at": { + "description": "DeletedAt marks a file the user deleted. The entry stays in the list\nrather than being removed because its position IS the download address\n(msg.Artifacts[index]); dropping it would shift every later file's index\nand hand an old link the wrong blob. Keeping it also keeps the entry in\nArtifactCollector's de-duplication set, so the next collect does not\nre-attach the very file that was deleted — its sandbox mtime has not\nmoved. Clients filter these out; the bytes are already reclaimed.", + "type": "string" + }, "file_name": { "description": "Original filename inside the sandbox", "type": "string" @@ -21159,6 +22663,14 @@ const docTemplate = `{ "description": "Provider identifier: openai, aliyun, zhipu, generic", "type": "string" }, + "spec": { + "description": "Spec overrides the catalog entry for this row: protocol, capability\nflags and the flat protocol compat object. Everything omitted is\ninherited from the vendor catalog (see internal/models/catalog).", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSpecOverride" + } + ] + }, "supports_vision": { "description": "Whether the model accepts image/multimodal input", "type": "boolean" @@ -21252,6 +22764,40 @@ const docTemplate = `{ "ModelSourceAzureOpenAI" ] }, + "github_com_Tencent_WeKnora_internal_types.ModelSpecOverride": { + "type": "object", + "properties": { + "api": { + "type": "string" + }, + "compat": { + "description": "Compat is a plain object so it round-trips through both JSON (API,\ndatabase column) and YAML (builtin_models.yaml).", + "type": "object", + "additionalProperties": {} + }, + "context_window": { + "type": "integer" + }, + "input": { + "type": "array", + "items": { + "type": "string" + } + }, + "max_output_tokens": { + "type": "integer" + }, + "reasoning": { + "type": "boolean" + }, + "thinking_levels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, "github_com_Tencent_WeKnora_internal_types.ModelType": { "type": "string", "enum": [ @@ -21283,6 +22829,17 @@ const docTemplate = `{ "ModelTypeASR" ] }, + "github_com_Tencent_WeKnora_internal_types.NamedCount": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "name": { + "type": "string" + } + } + }, "github_com_Tencent_WeKnora_internal_types.OBSEngineConfig": { "type": "object", "properties": { @@ -21542,12 +23099,20 @@ const docTemplate = `{ "type": "string" }, "mineru_model": { - "description": "MinerU 自建解析参数", + "description": "以下 backend、vLLM、公式/表格、语言参数仅对 3.x 及更早版本生效。", "type": "string" }, "mineru_parse_method": { "type": "string" }, + "mineru_server_api_key": { + "description": "MinerU 自建解析参数。协议按服务端自动识别:4.0+ 走 V1 API,更早版本走 /file_parse。", + "type": "string" + }, + "mineru_tier": { + "description": "4.0+:flash/basic/standard/advanced,空为服务端默认", + "type": "string" + }, "mineru_vlm_server_url": { "description": "vLLM 服务器地址 (vlm-http-client / hybrid-http-client)", "type": "string" @@ -21629,6 +23194,15 @@ const docTemplate = `{ "PromptCacheStatusHit" ] }, + "github_com_Tencent_WeKnora_internal_types.ProviderMetadata": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "integer" + } + } + }, "github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig": { "type": "object", "properties": { @@ -21784,6 +23358,27 @@ const docTemplate = `{ } } }, + "github_com_Tencent_WeKnora_internal_types.RerankOptions": { + "type": "object", + "properties": { + "enabled": { + "description": "Enabled turns the rerank stage off when explicitly false. Nil means on.", + "type": "boolean" + }, + "model_id": { + "description": "ModelID selects the rerank model. Empty falls back to the tenant\nRetrievalConfig, then to the first rerank model of the tenant.", + "type": "string" + }, + "threshold": { + "description": "Threshold is the minimum rerank model score. Nil uses the tenant\nRetrievalConfig. A pointer because 0 and negative scores are valid.", + "type": "number" + }, + "top_k": { + "description": "TopK caps the reranked results. Zero uses the endpoint's result count.", + "type": "integer" + } + } + }, "github_com_Tencent_WeKnora_internal_types.Resource": { "type": "object", "properties": { @@ -22244,6 +23839,14 @@ const docTemplate = `{ "description": "QueryText is required unless query_embedding is provided, keyword matching is disabled,\nand vector matching remains enabled.", "type": "string" }, + "rerank": { + "description": "Rerank, when present and enabled, reranks the fused candidates before\ntruncating to MatchCount. Only the hybrid-search API reads it; internal\ncallers rerank on their own.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RerankOptions" + } + ] + }, "scope_tag_ids": { "type": "array", "items": { @@ -22344,6 +23947,13 @@ const docTemplate = `{ "description": "MatchedContent is the actual content that was matched in vector search\nFor FAQ: this is the matched question text (standard or similar question)", "type": "string" }, + "matched_images": { + "description": "MatchedImages survives merging, deduplication and stored reference replay.\nIt contains storage references, never image bytes.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MatchedImage" + } + }, "metadata": { "description": "Metadata", "type": "object", @@ -22363,6 +23973,13 @@ const docTemplate = `{ "description": "Seq", "type": "integer" }, + "source_locators": { + "description": "SourceLocators point back into the original file for citation\nnavigation. Merged results carry the union of their chunks' locators.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SourceLocator" + } + }, "start_at": { "description": "Start at", "type": "integer" @@ -22393,6 +24010,10 @@ const docTemplate = `{ "description": "ForkedFromMessageID is the user or assistant message, IN THE PARENT\nSESSION, that the fork branched at. For a user point, messages strictly\nbefore it were copied here. For an assistant point, that answer is\nincluded so the branch continues after it.", "type": "string" }, + "host_workspace_dir": { + "description": "HostWorkspaceDir is the user-selected project directory this session\noperates in, for the WeKnora Lite host sandbox only. Empty means the session\ngets an auto-allocated workspace instead.\n\nWritten once at creation and never updated: re-pointing a live session\nat a different directory would leave its transcript describing files\nthat are no longer there. Standard edition never writes it.", + "type": "string" + }, "id": { "description": "ID", "type": "string" @@ -22481,6 +24102,9 @@ const docTemplate = `{ "model_id": { "type": "string" }, + "reasoning_effort": { + "type": "string" + }, "skill_names": { "type": "array", "items": { @@ -22538,6 +24162,85 @@ const docTemplate = `{ } } }, + "github_com_Tencent_WeKnora_internal_types.SourceLocator": { + "type": "object", + "properties": { + "bbox": { + "description": "BBox is [x0, y0, x1, y1] as fractions of the page width and height,\norigin at the top-left corner of the rendered page.", + "type": "array", + "items": { + "type": "number" + } + }, + "block": { + "description": "Block is the 1-based index among a Word file's body paragraphs and tables.", + "type": "integer" + }, + "end": { + "type": "integer" + }, + "end_ms": { + "type": "integer" + }, + "mapping": { + "description": "Mapping records verified text-to-source alignment. Empty means legacy.", + "type": "string" + }, + "page": { + "description": "Page is the 1-based PDF page.", + "type": "integer" + }, + "partial": { + "description": "Partial means some of the chunk has no source mapping.", + "type": "boolean" + }, + "quote": { + "description": "Quote is the complete cited overlap as parsed. Viewers match it\ninside the rendered original and against the\nanswer sentence that cites the chunk.", + "type": "string" + }, + "row_end": { + "type": "integer" + }, + "row_start": { + "type": "integer" + }, + "section": { + "description": "Section is the 1-based EPUB spine index.", + "type": "integer" + }, + "sheet": { + "description": "Sheet is the spreadsheet sheet name; RowStart/RowEnd are its 1-based\nrow numbers as shown by spreadsheet applications.", + "type": "string" + }, + "slide": { + "description": "Slide is the 1-based slide number in presentation order.", + "type": "integer" + }, + "source_hash": { + "description": "SourceHash binds the locator to the knowledge record’s source revision hash.", + "type": "string" + }, + "source_id": { + "description": "SourceID identifies a block within the parser result, not a rendered item.", + "type": "string" + }, + "start": { + "description": "Start/End are rune offsets into the original text file.", + "type": "integer" + }, + "start_ms": { + "description": "StartMs/EndMs bound an audio segment.", + "type": "integer" + }, + "title": { + "description": "Title names the section or slide when the source has one.", + "type": "string" + }, + "type": { + "type": "string" + } + } + }, "github_com_Tencent_WeKnora_internal_types.StarterSuggestionConfig": { "type": "object", "properties": { @@ -23418,6 +25121,14 @@ const docTemplate = `{ "description": "BrowserSearchInstructions customizes browser search for this user. Nil/empty uses the platform default.", "type": "string" }, + "gallery": { + "description": "Gallery holds the user's image-gallery UI state: the search\nactivation mode and the per-attribute search-field toggles. Written\nby the gallery's mode / checkbox interactions via the preferences\nPUT; read back by GET /knowledge-bases/:id/gallery-config so the\ngallery renders the same activation state on every device. Nil = the\nuser never touched the gallery controls (mode defaults to \"all\").", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.GalleryUserPrefs" + } + ] + }, "last_active_tenant_id": { "description": "LastActiveTenantID remembers the last workspace the user actively\nswitched into, so a fresh login (new device, cleared browser, new\nrefresh token) lands them back in that workspace instead of always\nbouncing to their home workspace. Written by the SPA's preferences\nPUT and by service-level SwitchTenant (including when switching\nhome, which stores the home ID). Login / RefreshToken validate that\nthe workspace still exists and the user still has an active membership\n(or CanAccessAllTenants) before honouring this preference; an\ninvalid pointer is best-effort cleared and the user falls back to\nhome. Refresh JWT claims have no tenant_id, so RefreshToken\nre-resolves from this field.\n\nnil = no preference (use user.TenantID, i.e. home)\n*0 = \"clear preference\" sentinel for the partial-update endpoint\n (UpdateUserPreferences turns this into nil). Otherwise treat\n a stored *0 the same as nil.\n*N = preferred workspace id.", "type": "integer" @@ -24602,6 +26313,17 @@ const docTemplate = `{ } } }, + "internal_handler.CopyModelRequest": { + "type": "object", + "required": [ + "display_name" + ], + "properties": { + "display_name": { + "type": "string" + } + } + }, "internal_handler.CreateAgentRequest": { "type": "object", "required": [ @@ -25167,6 +26889,26 @@ const docTemplate = `{ } } }, + "internal_handler.ListAllUsersResponse": { + "type": "object", + "properties": { + "has_more": { + "type": "boolean" + }, + "limit": { + "type": "integer" + }, + "offset": { + "type": "integer" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UserInfo" + } + } + } + }, "internal_handler.ListSystemAdminsResponse": { "type": "object", "properties": { @@ -25229,6 +26971,9 @@ const docTemplate = `{ "description": "为空时按需默认为 \"remote\"", "type": "string" }, + "spec": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSpecOverride" + }, "supportsDimensionOverride": { "type": "boolean" } @@ -25497,6 +27242,9 @@ const docTemplate = `{ "description": "为空时按需默认为 \"remote\"", "type": "string" }, + "spec": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSpecOverride" + }, "supportsDimensionOverride": { "type": "boolean" } @@ -25729,6 +27477,44 @@ const docTemplate = `{ } } }, + "internal_handler.SearchWikiRequest": { + "type": "object", + "required": [ + "query" + ], + "properties": { + "knowledge_base_id": { + "type": "string" + }, + "knowledge_base_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "limit": { + "type": "integer" + }, + "query": { + "type": "string" + } + } + }, + "internal_handler.SetUserStatusRequest": { + "type": "object", + "required": [ + "is_active", + "user_id" + ], + "properties": { + "is_active": { + "type": "boolean" + }, + "user_id": { + "type": "string" + } + } + }, "internal_handler.StorageCheckRequest": { "type": "object", "properties": { @@ -25908,6 +27694,14 @@ const docTemplate = `{ }, "name": { "type": "string" + }, + "vlm_config": { + "description": "VLMConfig updates the knowledge base's multimodal (vision) config.\nOptional: nil means \"no change\", mirroring how CreateKnowledgeBase\naccepts a top-level vlm_config.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.VLMConfig" + } + ] } } }, @@ -26146,6 +27940,64 @@ const docTemplate = `{ } } }, + "internal_handler.imageListRequestBody": { + "type": "object", + "properties": { + "attr_filters": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "attr_rules": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "is_enabled": { + "type": "boolean" + }, + "keyword": { + "type": "string" + }, + "knowledge_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "page": { + "description": "Page", + "type": "integer", + "minimum": 1 + }, + "page_size": { + "description": "Page size", + "type": "integer", + "maximum": 1000, + "minimum": 1 + }, + "search_in": { + "type": "array", + "items": { + "type": "string" + } + }, + "sort_by": { + "type": "string" + }, + "sort_order": { + "type": "string" + } + } + }, "internal_handler.invitationLookupRequest": { "type": "object", "required": [ @@ -26451,6 +28303,10 @@ const docTemplate = `{ } ] }, + "reasoning_effort": { + "description": "ReasoningEffort overrides thinking for this request; empty inherits the agent configuration.", + "type": "string" + }, "skill_names": { "description": "Per-request Skills selected via @mention", "type": "array", @@ -26485,6 +28341,10 @@ const docTemplate = `{ "description": "Description for the session (optional)", "type": "string" }, + "project_dir": { + "description": "ProjectDir is an optional Lite host-sandbox binding. When set it must\nbe an absolute path already present in the user-approved ProjectDirs\nlist. Empty means the session gets an auto-allocated workspace.", + "type": "string" + }, "title": { "description": "Title for the session (optional)", "type": "string" @@ -26574,12 +28434,36 @@ const docTemplate = `{ } } }, + "internal_handler_session.RewindSessionRequest": { + "type": "object", + "required": [ + "message_id" + ], + "properties": { + "message_id": { + "description": "MessageID is the message to rewind to. A user message deletes itself and\neverything after (the client prefills that question). An assistant\nmessage keeps itself and deletes everything after.", + "type": "string" + } + } + }, "internal_handler_session.SearchKnowledgeRequest": { "type": "object", "required": [ "query" ], "properties": { + "disable_keywords_match": { + "description": "Vector recall only", + "type": "boolean" + }, + "disable_vector_match": { + "description": "Keyword recall only", + "type": "boolean" + }, + "keyword_threshold": { + "description": "Minimum keyword score", + "type": "number" + }, "knowledge_base_id": { "description": "Single knowledge base ID (for backward compatibility)", "type": "string" @@ -26598,6 +28482,10 @@ const docTemplate = `{ "type": "string" } }, + "match_count": { + "description": "Number of results to return", + "type": "integer" + }, "mentioned_items": { "description": "Optional scoped tag mentions", "type": "array", @@ -26609,12 +28497,24 @@ const docTemplate = `{ "description": "Query text to search for", "type": "string" }, + "rerank": { + "description": "Rerank override", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RerankOptions" + } + ] + }, "tag_ids": { "description": "Tag IDs for filtering within a single KB", "type": "array", "items": { "type": "string" } + }, + "vector_threshold": { + "description": "Optional overrides of the tenant retrieval config. Omitted fields keep it.", + "type": "number" } } }, diff --git a/docs/release-v0.8.3-audit.md b/docs/release-v0.8.3-audit.md new file mode 100644 index 00000000..44149b47 --- /dev/null +++ b/docs/release-v0.8.3-audit.md @@ -0,0 +1,367 @@ +# v0.8.3 发布整理与文档核对记录 + +## 基线与范围 + +- 上个版本:`v0.8.2`(`3e8b0bfc80b845b2d4b2ed683994748741450a97`)。 +- 本次远程 main 截止:`31c6055687d33f9ad7a92cf453a264ce13a1700d`,2026-10-13 拉取,共 282 个提交。 +- 初始整理分支:`chore/release-v0.8.3-docs`;发布 PR 分支:`chore/release-v0.8.3-website`。2026-10-14 提取到最新 `github_public/main`(`3b3b519310721295162ea94b9fd62a92c8cab341`);相较盘点快照增加的 #4278 和 #4283 为基线已有修复,不属于本 PR 的新增代码。 +- 版本选择:延续当前 0.8 系列使用下一个未占用版本 0.8.3;存在需要迁移的行为变化,已单列升级说明。发布日期确定为 2026-10-14;本 PR 更新发布文档与版本元数据,tag 和 GitHub Release 由发布流程创建。 +- 审查对象是版本净变更对应的用户文档、配置/API 契约与发布内容;不是对 282 个提交重新进行完整安全审计。最终生效行为以该 main 快照的源码为准,提交标题只用于完整盘点。 +- 插件系统的 11 个引入提交由 `6c83d7ab4` 撤回,没有作为新功能发布。DeepSeek Harness 等已有外部客户端集成不受此结论影响。 + +## 已修正与补齐 + +| 主题 | 原有偏差或遗漏 | 核对源码与处理 | +| --- | --- | --- | +| 会话附件 | 未区分解析与读取时机、所有附件 24 小时过期;Agent 说明把阅读绑定到沙箱 | `temporary_document.go`、`temporary_document_prompt.go`、`attachment/reader.go`、repository 的 `expiredQuery`;上传后后台解析、Agent 按需读取并等待、Quick Answer 开流后等待、有效消息引用保留,覆盖会话/Agent/API/配置文档 | +| 工具选择 | 空数组回退默认、智能推理至少选一项 | `tools/allowed.go`、`custom_agent_tools.go`、迁移 116/35;区分 null 与 [],补工具目录 API、未知名称与开关管理项处理 | +| 注册策略 | 快速上手、总览、配置与系统设置仍将 invite_only 称作邀请注册 | config/handler 与 `auth.registration_mode`;统一三档语义,单列升级动作 | +| 用户管理 | 没有用户列表/启停 API,创建用户入口仍在账户与访问 | `SystemSettings.vue`、`UserManagement.vue`、`system.go`、router;补列表分页、停用撤销会话、保护条件与新入口 | +| 画廊 | 只有底层图片处理参数,没有用户流程和完整 API | `knowledge.go`、`routes_knowledge.go`、`types/image_gallery.go`;补画廊流程、属性契约、GET/POST 过滤与不同 ID 上限 | +| 图片检索 | 开关要求在长篇底层说明中,缺少检索入口概述 | `knowledgebase_search_image.go`、图片索引与重排/回答链路;区分画廊、图片向量与文本描述,明确默认关闭和重解析 | +| 图片观察 | 将兜底误写为任何观察失误都不会丢内容 | `image_attr_decision.go`;说明 on_unobserved 可关闭兜底,完整但错误的负值观察也可能跳过 OCR | +| 模型 | 已加入 Cohere 但仍计数 29,扩展指南遗漏 TEI/Pinecone 协议 | providers 的 Builtins/测试明确 30;更新数字与协议列表,补 WeMM 默认会话批处理说明 | +| 数据库 | 总清单仍停在 PG 110 / SQLite 30,并声称 SQLite 无 MCP metadata | 迁移文件 111–118 / 31–36;补投影回填、索引、OAuth 时间戳,修正默认镜像和附件状态 | +| MCP 授权 | 文档声称授权完成关闭整个服务连接 | `CloseClientsAfterAuthorization`;当前主体与旧 client_id 连接清理,补读取注册失败的保守回退,避免夸大为永不影响其他用户 | +| 本机技能 | 只介绍本机命令执行,漏掉安装及激活版本 | `tenant_skill_host.go`、`host_skills.go`;补本机安装目标、版本切换与失败保留旧版 | +| Wiki/引用/截图 | 旧图不能展示新分组和原文定位 | 更新说明,接入真实产品截图并核对图注;保留历史版本图片 | +| 配置 | 遗漏知识库描述预算和出站拨号超时 | `.env.example`、config、描述生成服务;补 2048 token 与 5s 默认,区分拨号和总请求超时 | +| 发布入口 | 首页、版本导航、徽章仍指 v0.8.2 | v0.8.3 页面、首页画廊、四种 README、共享导航、检查脚本与当前版本元数据统一;历史说明与依赖独立版本保留 | + +## 首页长期内容调整 + +- 中文功能名与前端一致使用「画廊」;画廊与多模态 Embedding 在首页、版本说明、知识库指南及四语 README 分开介绍。 +- 多模态 Embedding 先说明对这一模型类型的支持,以腾讯 WeMM-Embedding、Qwen3-VL-Embedding 等作为已支持的示例;WeMM 的具体预设和部署方式在详情展开,保留启用条件与现有部署文档入口。 +- 本机浏览器使用与版本号无关的独立图文区并复用真实截图;MCP Server 归入生态集成,对话追加、分叉与回滚归入 Agent 概述,不再等权展示。技能与沙箱、Wiki 保留专题,Lite 本机项目目录补入沙箱说明。 +- 语言新增等较小更新不再占据首页版本补充栏,仍在版本说明保留。首页模型厂商数修正为 30。 + +## 发布表达与历史约定 + +参考 2026-09-23 Claude 的「v0.8.0 到 v0.8.2 文档同步检查」对话和 v0.8.2 版本页: + +- 首页重点说明用途,简短文案配大图;配置前提与协议细节放入功能文档。 +- 当期版本区保留四项重点:画廊、多模态 Embedding、Wiki 图谱、原文引用定位,采用左侧紧凑功能导航与右侧截图,四项说明均保持展开,优先让说明与图片同屏;附件按需读取、平台用户管理、Seafile 与 Docker 终端使用次级链接。 +- 首页 01–07 及使用入口统一背景交替、全宽背景、内容容器和章节间距;浅色背景区统一提供分隔线,深色模式复用主题变量。 +- 本机浏览器保留独立专题,恢复「执行任务/连接扩展」两张图、BrowserSkill 图标与 GitHub 入口,左侧分别展开「执行任务」「连接扩展」的说明,右侧切换对应截图,与技能沙箱之间补齐边界和背景区分。 +- 版本页按用户可以做什么组织,保留升级操作与限制;提交数量、快照、撤回记录在本报告保留,完整技术更新仍见 CHANGELOG。 + +- Wiki 图谱渲染与交互调整单列版本章节;核对 #4147 的分组布局、主题说明、标签避让、分组切换和返回全图,首页 Wiki 专题首项使用分组图谱实拍截图。 + +## 第二轮整体复核(2026-10-14) + +- 再次按 v0.8.2 至既定 main 快照的 282 个提交核对首页与版本页,未改变发布基线。 +- 首页生态列表补 Seafile,复用前端现有图标;技能专题补 macOS Lite 本机安装。明确 Docker/E2B/Cube 均有终端,图形桌面只适用于 E2B/Cube 桌面模板。 +- 版本页补共享智能体操作调用者本机浏览器、工具列表搜索、检索参数与诊断、渠道会话管理、模型完成事件的实际模型 ID。跨库 Wiki 搜索明确为 API 能力,放回 Wiki 章节。 +- 补扫描 PDF 整页不生成图片向量、原文引用的访问权限与无原文件回退、Seafile 单个未加密资料库及不支持 SeaDoc 的边界。 +- 修正 CHANGELOG 将 #3950 的实体知识图谱方向/来源修复归到 Wiki 的错误;两类图谱分别说明。 +- Swagger 原产物遗漏 10 个现有路径;使用与 go.mod 一致的 swag v1.16.6 重新生成。补模型目录读取/预览/发布的 3 个接口注释(2 个路径),正确声明仅管理员 JWT、版本冲突与 JSON overlay 对象;修复 spans 注释重复 API 基路径及缺失鉴权声明。三种产物均由 `make docs` 生成,不手改产物。 +- 本次新增后端改动仅为 Swagger 注释及 schema 标签,不改接口行为。契约检查覆盖新发布接口、基路径不得重复、overlay 对象类型。 + +## 发布内容与截图 + +- 面向用户的版本说明:`website-docs/07-releases/v0.8.3.md`。 +- 英文分类更新清单:根目录 `CHANGELOG.md`;以下附录保留全部提交,可追溯未单独展开的测试/构建/修正文档提交。 +- 截图清单:`website-docs/README.md` 的「v0.8.3 截图清单」,8 个本次场景 + 1 个既有未补齐场景;4 个首页场景复用对应文件。 +- 已接入用户提供的 11 张真实截图并逐张检查,画廊、多模态设置、Wiki 分组图谱、引用定位均已同步到首页。画廊截图保留了原始界面中的部分图片加载失败状态;图注已按实际展示内容调整。未合成产品界面、未执行浏览器外观验收。 + +## 验证记录 + +- 使用 Node 24.19.0 执行 `npm run build --prefix website-docs`,成功完成 Next.js 首页与 VitePress 文档构建、内部链接检查、60 个 Mermaid 图检查(0 失败)、首页内容审计和统一站点检查(77 页、376 个本地路由/资源)。 +- `npm run lint --prefix website-docs/homepage` 通过;`git diff --check` 通过。发布分支的 `docs`、`internal/handler`、`internal/application/service` 相对 `github_public/main` 的增量 Go lint 为 0 issues。 +- `go test ./docs` 通过,覆盖 Go 注册文档、swagger.json 和 swagger.yaml 的路由/schema 契约;再次执行 `make docs` 后三份产物逐字节一致。 +- 根 VERSION、文档 VERSION、前端/文档 package.json 与 lockfile 根版本、Helm appVersion 均核对为 0.8.3;`scripts/get_version.sh json` 输出 0.8.3。两个 lockfile 除根版本字段外与 main 完全一致,没有依赖变更。 +- 校验附录包含全部 282 个提交,PostgreSQL 迁移文件为 238 个;历史版本页未修改。 +- 首页 `prebuild` / `predev` 自动同步复用截图,更新文档源图后无需手动复制;同步回归覆盖替换源图、终端文件名映射及保留首页独有图片。预览中的 Wiki 图片已按 HTTP 响应逐字节核对为最新源图,顶部留白收紧,WeMM 名称链接至官方仓库。 +- 静态站点产物位于 `website-docs/static-site/`。11 张文档截图及首页复用的 5 张截图均已补齐;未执行浏览器外观验收或 Docker 部署测试。 +- 本 PR 仅包含文档、官网内容、截图、版本元数据与 Swagger 注释/生成物。附件读取修复已单独通过 #4283 合入,本 PR 不重复携带其代码或测试。 +- 未运行全量 Go/前端业务回归或实际数据库升级。迁移说明依据当前源文件核对,不能替代生产备份与升级演练。 +- 依赖安装提示已有依赖漏洞,未在本次发布文档整理中升级依赖;构建存在依赖包 chunk-size 提示,不影响构建结果。 + +## 全部提交(时间顺序) + +「已撤回」不进入有效功能列表;「构建/测试/文档」仍保留在盘点中。其余按主题归入 CHANGELOG 的新增、改进、修复和升级事项。 + +| 日期 | 提交 | 内容 | 处理 | +| --- | --- | --- | --- | +| 2026-09-24 | [cee697920](https://github.com/Tencent/WeKnora/commit/cee697920e0aebf067b57cf9612aa330863b17c3) | fix(website-docs): serve everything but the homepage from /docs/ | 有效变更,按主题归纳 | +| 2026-09-24 | [b6b32c24e](https://github.com/Tencent/WeKnora/commit/b6b32c24e152650cf94083c21195fe8bd24328f5) | test(website-docs): update integration test for the v0.8.2 header and release gallery | 构建/测试/文档或体验调整 | +| 2026-09-24 | [8d4015014](https://github.com/Tencent/WeKnora/commit/8d40150149ce00a952a98a10a80226ad6584abd5) | fix(session): keep auto-generated titles plain text | 有效变更,按主题归纳 | +| 2026-09-24 | [967ed0970](https://github.com/Tencent/WeKnora/commit/967ed097062c61723045ae103b665982728dc572) | feat(models): add system admin model catalog console (#3662) | 有效变更,按主题归纳 | +| 2026-09-24 | [eebc1d864](https://github.com/Tencent/WeKnora/commit/eebc1d86436e9cd7b9f6d24c1f973527f318853f) | fix(ui): restore inner padding on form popups (#3673) | 有效变更,按主题归纳 | +| 2026-09-24 | [e6284f4ea](https://github.com/Tencent/WeKnora/commit/e6284f4eacc89a4b2f1ef2469e9f86241e2841cd) | fix(browser): let shared-space agents drive the caller's local browser | 有效变更,按主题归纳 | +| 2026-09-24 | [5d00985f7](https://github.com/Tencent/WeKnora/commit/5d00985f720440f88c88ccdf8f65232175d885d5) | docs: restructure the English and Chinese READMEs | 构建/测试/文档或体验调整 | +| 2026-09-24 | [44a1df604](https://github.com/Tencent/WeKnora/commit/44a1df60460fc06fba9eed9022d57164605a487c) | docs(readme): website-matched design for all four READMEs (#3679) | 构建/测试/文档或体验调整 | +| 2026-09-24 | [65d8129cb](https://github.com/Tencent/WeKnora/commit/65d8129cb64f4ccc23a7b73896ebe424d31ba228) | fix(retriever/es): keep vectors and enabled state on CopyIndices (#3678) | 有效变更,按主题归纳 | +| 2026-09-24 | [3cf0be2e9](https://github.com/Tencent/WeKnora/commit/3cf0be2e9745b97dd903feec1c66a936780237d8) | fix(embed): warn at startup when no signing key is configured | 有效变更,按主题归纳 | +| 2026-09-24 | [e22a8367e](https://github.com/Tencent/WeKnora/commit/e22a8367efc9802353e6981e162226459a998404) | feat(docparser): support MinerU 4.0 V1 API for self-hosted MinerU | 有效变更,按主题归纳 | +| 2026-09-24 | [9253b2c1d](https://github.com/Tencent/WeKnora/commit/9253b2c1dc8f4fe83fec8e66ba79dbf00144fd43) | fix(frontend): link docs to the public docs site instead of GitHub | 有效变更,按主题归纳 | +| 2026-09-24 | [9fc08c207](https://github.com/Tencent/WeKnora/commit/9fc08c2079d89173c17c61356dee3838772931c5) | feat(retrieval): unify rerank across search APIs and expose diagnostics (#3675) | 有效变更,按主题归纳 | +| 2026-09-24 | [65d8a34ea](https://github.com/Tencent/WeKnora/commit/65d8a34ead4c99991d450ecc8c0acdbcf5b0e583) | fix(desktop): pair the Lite browser against the local API listener (#3677) | 有效变更,按主题归纳 | +| 2026-09-24 | [c029b50ef](https://github.com/Tencent/WeKnora/commit/c029b50ef928d5c21ffb1922f6d541b0d27bb7a4) | fix(rss): 拒绝超限响应以避免正文静默截断 | 有效变更,按主题归纳 | +| 2026-09-24 | [7e82ee33d](https://github.com/Tencent/WeKnora/commit/7e82ee33dcefc398ca455775700bdf8730054aa5) | docs(misc): add intro video source | 构建/测试/文档或体验调整 | +| 2026-09-24 | [e2433b129](https://github.com/Tencent/WeKnora/commit/e2433b1293fa350d972902cd3676a1aa9a9c9aac) | feat(lite): install and run skills on the host (#3661) | 有效变更,按主题归纳 | +| 2026-09-25 | [e896270c4](https://github.com/Tencent/WeKnora/commit/e896270c418c01d230c9c6d11f05d0148677892a) | docs(readme): surface agent tools in the overview and condense feature tables (#3688) | 构建/测试/文档或体验调整 | +| 2026-09-25 | [04adc1327](https://github.com/Tencent/WeKnora/commit/04adc132726d93c9247898af79ad8f3b542df4f0) | fix(retrieval): fix recall correctness, score scales, cost and agent tools (#3687) | 有效变更,按主题归纳 | +| 2026-09-25 | [68fe9599c](https://github.com/Tencent/WeKnora/commit/68fe9599cdb853eb1205499d44ed176613f875df) | feat(gallery): add an image gallery tab with schema-driven filters (#3694) | 有效变更,按主题归纳 | +| 2026-09-25 | [ebbcf96fa](https://github.com/Tencent/WeKnora/commit/ebbcf96fabb651c091c3ee2272d802b80c100c4e) | feat(gallery): rework the gallery toolbar, header tabs and image viewer | 有效变更,按主题归纳 | +| 2026-09-25 | [1bf717a54](https://github.com/Tencent/WeKnora/commit/1bf717a54d4413e0e5cfe5e2b7ff008489b97c04) | feat(chat): open cited documents at the cited passage (#3700) | 有效变更,按主题归纳 | +| 2026-09-25 | [ab115c094](https://github.com/Tencent/WeKnora/commit/ab115c0944b6e7f3c5d976970b67cb6070f6db1b) | fix(knowledge): stop parses from getting stuck in processing or finalizing (#3696) | 有效变更,按主题归纳 | +| 2026-09-25 | [8619bdf3c](https://github.com/Tencent/WeKnora/commit/8619bdf3c5149acc8ca51263e4d485f97da39211) | docs(readme): swap in the new intro video | 构建/测试/文档或体验调整 | +| 2026-09-25 | [ef6f28c1c](https://github.com/Tencent/WeKnora/commit/ef6f28c1cafec72bd05fcb4fbd3feb8144f93e3d) | fix(agent): recover tool panics instead of crashing the server | 有效变更,按主题归纳 | +| 2026-09-25 | [8356742dd](https://github.com/Tencent/WeKnora/commit/8356742dd5a75cc84a5f18a527665eac4abf5bea) | fix(llm): treat cut-off streams as broken and tighten LLM retries | 有效变更,按主题归纳 | +| 2026-09-25 | [ef938f911](https://github.com/Tencent/WeKnora/commit/ef938f9114cc82e799c56b5bde2b3aca9bc3832c) | fix(logger): keep LLM debug records inside their directory | 有效变更,按主题归纳 | +| 2026-09-25 | [8a75bece6](https://github.com/Tencent/WeKnora/commit/8a75bece6d491a21e8b7b4c6171a8151ad77da9b) | fix(mcp): close MCP connections on shutdown without blocking exit | 有效变更,按主题归纳 | +| 2026-09-25 | [27b0c84bf](https://github.com/Tencent/WeKnora/commit/27b0c84bfdb2641c66942aea4620f44b328096e1) | fix(docparser): make the MinerU parse timeouts configurable | 有效变更,按主题归纳 | +| 2026-09-25 | [929dad574](https://github.com/Tencent/WeKnora/commit/929dad5747fb24e3cc85ec86eb1f4b4a3a497441) | fix(weaviate): accept a class another worker created first (#3689) | 有效变更,按主题归纳 | +| 2026-09-25 | [605d70fc5](https://github.com/Tencent/WeKnora/commit/605d70fc528a948591b647b0b805e7bfd617d4be) | fix(notion): 在资源发现失败时中止增量同步 (#3682) | 有效变更,按主题归纳 | +| 2026-09-25 | [5614c04d8](https://github.com/Tencent/WeKnora/commit/5614c04d88f2c28620a6bd3e16fc1093b9c54539) | fix(feishu): stop Wiki pagination on repeated page tokens (#3645) | 有效变更,按主题归纳 | +| 2026-09-25 | [6eb3cce16](https://github.com/Tencent/WeKnora/commit/6eb3cce164f6b1efe9c3a02973502c93f7d45126) | fix(agent): 合并相邻 assistant 消息时保留 tool_calls,避免孤儿 tool 消息导致整轮 400 (#3574) | 有效变更,按主题归纳 | +| 2026-09-25 | [e5a301ed3](https://github.com/Tencent/WeKnora/commit/e5a301ed3ad156d7139231b43f7664e05eea6806) | fix(files): accept canonical storage:// paths in bare provider services (#3166) | 有效变更,按主题归纳 | +| 2026-09-25 | [5c717ca04](https://github.com/Tencent/WeKnora/commit/5c717ca045ab6742b5bb57dc1669a54330f6b65b) | fix(im): handle unresolved Feishu resource images (#2761) | 有效变更,按主题归纳 | +| 2026-09-25 | [591f1c0e4](https://github.com/Tencent/WeKnora/commit/591f1c0e4fb70a9ece1d807b19c6fa0c24e6b102) | docs: drop references to source files that no longer exist (#3631) | 构建/测试/文档或体验调整 | +| 2026-09-25 | [d9444683d](https://github.com/Tencent/WeKnora/commit/d9444683dae2f382e29655f3efc6cc156d199329) | docs(dev): 补充 Swagger 容器访问与空白页排查步骤 (#3620) | 构建/测试/文档或体验调整 | +| 2026-09-25 | [0cb1e57fa](https://github.com/Tencent/WeKnora/commit/0cb1e57fae586908ca8d005459eb82acf54ca015) | fix(container): propagate host project lookup errors (#3611) | 有效变更,按主题归纳 | +| 2026-09-25 | [4668447aa](https://github.com/Tencent/WeKnora/commit/4668447aa60b5190f90a8a53546151df4ec4ed11) | fix(helm): pin application images to chart version (#3669) | 有效变更,按主题归纳 | +| 2026-09-25 | [22404e92b](https://github.com/Tencent/WeKnora/commit/22404e92b79dfc3ae7d60342ba16b0fd37364b30) | style(files): wrap long test case to satisfy lll | 构建/测试/文档或体验调整 | +| 2026-09-25 | [508048aee](https://github.com/Tencent/WeKnora/commit/508048aee9739e4d034ab530d6a25603a6d9042d) | fix(frontend): mount the settings modal only once on /platform/settings | 有效变更,按主题归纳 | +| 2026-09-25 | [745a22d06](https://github.com/Tencent/WeKnora/commit/745a22d066cab0dc555372a7510c017c5ddb9c6a) | refactor(frontend): drop TTL resource caches and remove duplicate startup requests (#3562) | 构建/测试/文档或体验调整 | +| 2026-09-25 | [c7601b2d2](https://github.com/Tencent/WeKnora/commit/c7601b2d2aaf298939b5ce775970c3005044d74a) | feat(wiki): 增加跨知识库 Wiki 搜索 POST /wiki-search (#3535) | 有效变更,按主题归纳 | +| 2026-09-25 | [a9d71038b](https://github.com/Tencent/WeKnora/commit/a9d71038b6657fda5e01a85ad085b861c2021758) | fix(models): stop advertising graded thinking levels the wire format drops (#3552) | 有效变更,按主题归纳 | +| 2026-09-25 | [00e6366fd](https://github.com/Tencent/WeKnora/commit/00e6366fd27a42bca7b08d6fef5b909339bf6be9) | fix(datasource): validate cron schedules and persist manual-only mode (#3653) | 有效变更,按主题归纳 | +| 2026-09-25 | [0bf105499](https://github.com/Tencent/WeKnora/commit/0bf105499b093578ddbaabf24403ba0aa776657a) | fix(knowledge): reject invalid JSON uploads before async parse (#3360) | 有效变更,按主题归纳 | +| 2026-09-25 | [a7fc9e13d](https://github.com/Tencent/WeKnora/commit/a7fc9e13dab91cf5bfc3d33c0f09415879957868) | fix(client): accumulate multiline SSE data (#2122) | 有效变更,按主题归纳 | +| 2026-09-25 | [e7c27ccc9](https://github.com/Tencent/WeKnora/commit/e7c27ccc9e7fc806c583f6bb5de012cba12e5c53) | feat(confluence): add directory sync and private image assets (#3319) | 有效变更,按主题归纳 | +| 2026-09-25 | [a7ac21ce7](https://github.com/Tencent/WeKnora/commit/a7ac21ce769fa75854c0b7c7cfb04d934464fa73) | fix(docreader): sanitize non-conforming styles.xml fills before openpyxl loads (#3637) (#3638) | 有效变更,按主题归纳 | +| 2026-09-25 | [1dd3fe867](https://github.com/Tencent/WeKnora/commit/1dd3fe867e0d343df765961eb090ae0c72a3c031) | fix(docreader): drop data validation ranges openpyxl cannot parse instead of failing the sheet (#3599) (#3608) | 有效变更,按主题归纳 | +| 2026-09-25 | [4364e61af](https://github.com/Tencent/WeKnora/commit/4364e61afa4bf1e086c34b4220bb21449aa15b25) | feat(datasource/yuque): preserve TOC folder hierarchy for synced documents (#3476) | 有效变更,按主题归纳 | +| 2026-09-26 | [47773b5bd](https://github.com/Tencent/WeKnora/commit/47773b5bd1fc33ecbe96d11824d4aa4b97ae2438) | fix(frontend): initialize chat citation popover after botmsg props | 有效变更,按主题归纳 | +| 2026-09-26 | [c91a8d11f](https://github.com/Tencent/WeKnora/commit/c91a8d11f8eaa1370970355019a001a36e993117) | feat(plugin): plugin system foundation — builtin plugins, config schemas and workspace switches (#3711) | 已撤回 | +| 2026-09-26 | [ed63e35cc](https://github.com/Tencent/WeKnora/commit/ed63e35cc7d49856c562b9f519534cba6d6b9ee8) | feat(plugin): install declarative plugins — MCP servers, skills and model vendors (#3716) | 已撤回 | +| 2026-09-26 | [4328ab26a](https://github.com/Tencent/WeKnora/commit/4328ab26a942a3fb9c397dbea57b41ac1074cc46) | feat(plugin): code plugins — extension protocol, Go SDK, plugin host, web search and data source adapters (#3720) | 已撤回 | +| 2026-09-26 | [ff49f9491](https://github.com/Tencent/WeKnora/commit/ff49f9491d6b73de5adea18f061a7d04073cbd44) | feat(plugin): Host API with a key-value store, and document parsers from plugins (#3721) | 已撤回 | +| 2026-09-26 | [728007ada](https://github.com/Tencent/WeKnora/commit/728007ada9df5461d1f70aca64ec358718b891bd) | feat(plugin): remote runtime, Python SDK and python host plugins (P2 batch 3) (#3724) | 已撤回 | +| 2026-09-26 | [da4ef68d9](https://github.com/Tencent/WeKnora/commit/da4ef68d9d5327dfd236299d882f092943a1a165) | feat(plugin): standalone plugin hosts with Redis discovery (P2 batch 4) (#3725) | 已撤回 | +| 2026-09-26 | [996696057](https://github.com/Tencent/WeKnora/commit/996696057f7ec229fd1930188955283042f0c852) | feat(plugin): sandboxed plugin pages and the @weknora/plugin-ui bridge (P2 batch 5) (#3727) | 已撤回 | +| 2026-09-26 | [cf502ba46](https://github.com/Tencent/WeKnora/commit/cf502ba46a629598db393d747be05da3df682c18) | feat(plugin): event delivery and webhooks for plugins (P2 batch 6) (#3728) | 已撤回 | +| 2026-09-26 | [01222aac8](https://github.com/Tencent/WeKnora/commit/01222aac8e884f9a14db531072c6074f059beb4a) | feat(plugin): dynamic form options, OAuth connections and resource limits (P2 batch 7) (#3729) | 已撤回 | +| 2026-09-26 | [4f5d475c3](https://github.com/Tencent/WeKnora/commit/4f5d475c3eebe47d7c0e921799bfdb8337f6a024) | feat(examples): Jira Cloud plugin with OAuth, dynamic options and a skill (#3730) | 已撤回 | +| 2026-09-26 | [a829d7cc9](https://github.com/Tencent/WeKnora/commit/a829d7cc9cc3ac96c3cd1bbd6210203966c97d56) | feat(plugin): agent tools served by plugins, with result views (P2 batch 8) (#3733) | 已撤回 | +| 2026-09-26 | [6c83d7ab4](https://github.com/Tencent/WeKnora/commit/6c83d7ab479212c136094182a68ac6e238ea370c) | revert: take the plugin system back out of main | 撤回插件系列 | +| 2026-09-26 | [9fcc2c674](https://github.com/Tencent/WeKnora/commit/9fcc2c674309b42a1d4077e6b4c2a2334d49e57c) | fix(dev): propagate dev.sh exit status and pull MinIO from pgsty/minio | 有效变更,按主题归纳 | +| 2026-09-26 | [4df7ccbb4](https://github.com/Tencent/WeKnora/commit/4df7ccbb4f650082331452a92b52854f8922da2a) | fix(chat): drop stale minimap-target class binding | 有效变更,按主题归纳 | +| 2026-09-27 | [9114e4e4f](https://github.com/Tencent/WeKnora/commit/9114e4e4f905be71976a77c684d3f92731e6f9a6) | fix(citations): 修复原文定位、高亮范围与 DocReader 启动失败 (#3794) | 有效变更,按主题归纳 | +| 2026-09-28 | [a570dffcf](https://github.com/Tencent/WeKnora/commit/a570dffcfa51ad92a5c66a8260ceaaa831567dc0) | test(wiki): 表格夹具改用合成数据 | 构建/测试/文档或体验调整 | +| 2026-09-28 | [5bf2ae1cc](https://github.com/Tencent/WeKnora/commit/5bf2ae1cc27aa555957dc1c258968c5b36246b26) | fix(faq): actually clean FAQ entry payloads before validation and storage | 有效变更,按主题归纳 | +| 2026-09-28 | [0b463e459](https://github.com/Tencent/WeKnora/commit/0b463e459aa70ea42036a49664a75e4da95684bf) | test(skills): wait for the host install to release its lock before asserting | 构建/测试/文档或体验调整 | +| 2026-09-28 | [9cab22685](https://github.com/Tencent/WeKnora/commit/9cab2268531477f6cd879acfd975189973d099cd) | docs: extract active tenant ID in the API quickstart | 构建/测试/文档或体验调整 | +| 2026-09-28 | [157fb4d3c](https://github.com/Tencent/WeKnora/commit/157fb4d3c1763c47fdda88aa4133b37439bbc54a) | fix(frontend): label host-sandbox skill secret cards like the sandbox cards | 有效变更,按主题归纳 | +| 2026-09-28 | [bdad5eea2](https://github.com/Tencent/WeKnora/commit/bdad5eea2b46546db4c1481fc83d62bd69351fcc) | fix(chat): clear stale KB scope on session restore | 有效变更,按主题归纳 | +| 2026-09-28 | [d528d1fc3](https://github.com/Tencent/WeKnora/commit/d528d1fc3ca60f331befe1ba8c0ce28962024bd3) | fix: skip table-summary tasks for missing documents | 有效变更,按主题归纳 | +| 2026-09-28 | [d270a844a](https://github.com/Tencent/WeKnora/commit/d270a844ac7684ed6eeea7e0469f3f5e37aef8ca) | fix: reject empty table-summary model responses | 有效变更,按主题归纳 | +| 2026-09-28 | [675b06add](https://github.com/Tencent/WeKnora/commit/675b06addcd76a9f9f0c515bcd6554008efc67d3) | test: consolidate table summary regressions | 构建/测试/文档或体验调整 | +| 2026-09-28 | [bad7afa6a](https://github.com/Tencent/WeKnora/commit/bad7afa6ae3198b8e574c94614e41267dbe6e005) | fix(sandbox): pass desktop slot timing to the renew goroutine | 有效变更,按主题归纳 | +| 2026-09-28 | [4ba85e2ed](https://github.com/Tencent/WeKnora/commit/4ba85e2edf71a041fa6846c14eb74ccfa0cfb389) | fix(wiki): fan out follow-up triggers so backlogs drain at ingest_max_inflight | 有效变更,按主题归纳 | +| 2026-09-28 | [c819abd95](https://github.com/Tencent/WeKnora/commit/c819abd9589c23a3fa504f946fc477499cd0fe70) | fix(wiki): bound outstanding follow-up tasks | 有效变更,按主题归纳 | +| 2026-09-28 | [ec0ca4633](https://github.com/Tencent/WeKnora/commit/ec0ca46334556e5b49a981e9cf26189e162eca31) | fix(server): run ResourceCleaner on signal shutdown instead of racing Fatalf exit (#3804) | 有效变更,按主题归纳 | +| 2026-09-29 | [08f7e702c](https://github.com/Tencent/WeKnora/commit/08f7e702cfb3a1344b537641739fa08c523df255) | fix(datasource/dingtalk): 跳过不再静默,展开叶子不再报错 | 有效变更,按主题归纳 | +| 2026-09-29 | [7d1d71e50](https://github.com/Tencent/WeKnora/commit/7d1d71e50d7123dc14c749d5677b588f728dc7c9) | fix(datasource/dingtalk): 块级渲染不再静默丢内容(列表按线上真实形状渲染 + 未建模块类型可见) (#3822) | 有效变更,按主题归纳 | +| 2026-09-29 | [72e105f46](https://github.com/Tencent/WeKnora/commit/72e105f46a7747d5acb1a887bd459419d4b9b24d) | fix(gitlab): 按提交快照比较增量同步变更 | 有效变更,按主题归纳 | +| 2026-09-29 | [a282d1091](https://github.com/Tencent/WeKnora/commit/a282d1091ebf8c5d7d8d64796a25f1e1527bd296) | fix(feishu): 云盘分页补上 #3645 给 wiki 加的重复 page token 防护 (#3770) | 有效变更,按主题归纳 | +| 2026-09-29 | [b9be7d0d0](https://github.com/Tencent/WeKnora/commit/b9be7d0d0d525435b67caeb49ef0502d6b6e7097) | fix(notion): 修复页面清空后旧正文残留 | 有效变更,按主题归纳 | +| 2026-09-29 | [15d484552](https://github.com/Tencent/WeKnora/commit/15d484552140eafe491e01d7f7bbfb558515801b) | fix(rss): 修复全文回退后增量同步不重试 | 有效变更,按主题归纳 | +| 2026-09-29 | [cf079b8dc](https://github.com/Tencent/WeKnora/commit/cf079b8dcd3315b46f1a2c848837f851ec61e04c) | fix(models): keep Retry-After on HTTPError and honour it in agent LLM retries | 有效变更,按主题归纳 | +| 2026-09-29 | [436d02fdf](https://github.com/Tencent/WeKnora/commit/436d02fdf3865279df3ff3bc14a91057b56d0464) | fix(compaction): 流因取消而关闭时不得当成空摘要成功返回 | 有效变更,按主题归纳 | +| 2026-09-29 | [e39043f34](https://github.com/Tencent/WeKnora/commit/e39043f34b22bec26ed6ddb4d08ff66e9555f3ea) | fix(repository): 关键词 LIKE/ILIKE 检索补显式 ESCAPE,修复 Lite 上静默漏结果 | 有效变更,按主题归纳 | +| 2026-09-29 | [1912ba26c](https://github.com/Tencent/WeKnora/commit/1912ba26c544025adb869459a74c2cbac2a95cd9) | test(weaviate): 让并发建表的用例真的每个 worker 都去创建,消掉随机失败 | 构建/测试/文档或体验调整 | +| 2026-09-29 | [f46c99056](https://github.com/Tencent/WeKnora/commit/f46c9905677b36a454aa6669a2619f9eecf9fd23) | fix(embed): 开启 Host context 后点击追问建议不再返回 400 | 有效变更,按主题归纳 | +| 2026-09-29 | [75d2c1b58](https://github.com/Tencent/WeKnora/commit/75d2c1b58343b2872051a24b78185298fb8b88f3) | fix(frontend): normalize style guard paths | 有效变更,按主题归纳 | +| 2026-09-29 | [0c6b30cfa](https://github.com/Tencent/WeKnora/commit/0c6b30cfa705c1d2f2ccd084cd76174738a7fb4b) | fix(docs): spawn nested npm through Node on Windows | 有效变更,按主题归纳 | +| 2026-09-29 | [9842e51d4](https://github.com/Tencent/WeKnora/commit/9842e51d40a54ca2dbb61153f3fb587da1265b7a) | fix(frontend): 修复复制模型时模型名称被改写的问题 (#3830) | 有效变更,按主题归纳 | +| 2026-09-30 | [5225edc0f](https://github.com/Tencent/WeKnora/commit/5225edc0f746ae68e15dc4bd6fde9343efde1142) | feat(auth): 新增仅限邀请注册档位 (#3900) | 有效变更,按主题归纳 | +| 2026-09-30 | [176aa0d02](https://github.com/Tencent/WeKnora/commit/176aa0d02b30b64634d55d000b6b44e00ec0310a) | fix(sandbox): build real arm64 sandbox images and ship arm64 Cube variants | 有效变更,按主题归纳 | +| 2026-09-30 | [dba912755](https://github.com/Tencent/WeKnora/commit/dba9127558c3df160c8ff181e2a0a99172ae7c75) | docs(api): 补充模型复制接口说明 | 构建/测试/文档或体验调整 | +| 2026-09-30 | [2ec177462](https://github.com/Tencent/WeKnora/commit/2ec1774623a77608902287b2ba42dcde3e4daaab) | fix(auth): 令牌写入失败不再当成登录成功,查询失败不再谎称已撤销 | 有效变更,按主题归纳 | +| 2026-09-30 | [b71b31c89](https://github.com/Tencent/WeKnora/commit/b71b31c897efae7b6b8320ab0e5bdf796eb1e006) | fix(ima): 笔记正文被清空后旧正文仍留在知识库 | 有效变更,按主题归纳 | +| 2026-09-30 | [1dbe9d0c1](https://github.com/Tencent/WeKnora/commit/1dbe9d0c1a1b9dd8d7c345c5c1672f76269b86c5) | fix(gitlab): 仓库文件下载补体积上限,超限报错而不是无界读入 (#3887) | 有效变更,按主题归纳 | +| 2026-09-30 | [75fc0ad15](https://github.com/Tencent/WeKnora/commit/75fc0ad1590786202af57546a6879bb074671ab9) | feat(docparser): upgrade AnyDoc to 0.2.4 and parse assets once | 有效变更,按主题归纳 | +| 2026-09-30 | [bccb4b151](https://github.com/Tencent/WeKnora/commit/bccb4b151bae403508da77fbb174efc79dc47c1a) | fix(embed): 内嵌网页只传图片不输入文字时不再返回 400 | 有效变更,按主题归纳 | +| 2026-10-07 | [402f69832](https://github.com/Tencent/WeKnora/commit/402f69832e395d8d193d89fef7a248a1c48ad24c) | fix(notion): 查询撞厂商上限被截断时不再静默,截断轮次不下发删除 (#3845) | 有效变更,按主题归纳 | +| 2026-10-07 | [0ec945fe5](https://github.com/Tencent/WeKnora/commit/0ec945fe5df0def761351aa640bdb588bd8e1bb2) | fix(dataset): use supported default QA model (#3965) | 有效变更,按主题归纳 | +| 2026-10-07 | [72b8a106c](https://github.com/Tencent/WeKnora/commit/72b8a106c77a3337bd5d785c595c8575686b6025) | fix(sqlite): 检索后端批量更新索引副本失败不再吞掉错误 (#3768) | 有效变更,按主题归纳 | +| 2026-10-07 | [a8a2c17b8](https://github.com/Tencent/WeKnora/commit/a8a2c17b892c378686e4d0f3916b064d2b38da80) | fix(sqlite): 索引行写入失败不再被丢弃,BatchSave 回滚而不是留下「主行在、索引行不在」 (#3843) | 有效变更,按主题归纳 | +| 2026-10-07 | [f9eeb8dc8](https://github.com/Tencent/WeKnora/commit/f9eeb8dc8535d678e206b00c6e24540db542b868) | fix(retriever/es): _bulk 的 per-item 失败不再被吞,全部被拒时 BatchSave 返回错误 (#3842) | 有效变更,按主题归纳 | +| 2026-10-07 | [5f5093b9f](https://github.com/Tencent/WeKnora/commit/5f5093b9f74e2c8621c11e1c53886758784d68b2) | fix(retriever): Qdrant/Milvus 关键词检索整批失败返回 error,不再当成「没有匹配」 (#3847) | 有效变更,按主题归纳 | +| 2026-10-07 | [5648d24a9](https://github.com/Tencent/WeKnora/commit/5648d24a93d353dca6d719178752e26d72a2478a) | fix(retriever/milvus): CopyIndices 按映射分块读源行,去掉会静默漏向量的 offset 窗口 (#3883) | 有效变更,按主题归纳 | +| 2026-10-07 | [9490035f1](https://github.com/Tencent/WeKnora/commit/9490035f1517bd68545df024e05b2244e4d1ac9a) | fix(agent): 图谱查询的三处截断必须可见,模型不再把子图当全集 (#3885) | 有效变更,按主题归纳 | +| 2026-10-07 | [9fa9e7c29](https://github.com/Tencent/WeKnora/commit/9fa9e7c29d8eb727825b14f0b0ca23907969b91a) | fix: use consistent qdrant env settings (#3960) | 有效变更,按主题归纳 | +| 2026-10-08 | [afc6cbd50](https://github.com/Tencent/WeKnora/commit/afc6cbd50264a54018faa9552346d45f964834fe) | fix(milvus): validate connections and preserve gRPC resolver defaults (#3654) | 有效变更,按主题归纳 | +| 2026-10-08 | [e29301115](https://github.com/Tencent/WeKnora/commit/e29301115a276afc4e7be7f0ffe568066c0c3386) | fix(graph): preserve relationship direction and document provenance (#3950) | 有效变更,按主题归纳 | +| 2026-10-08 | [7c284e7fc](https://github.com/Tencent/WeKnora/commit/7c284e7fc9beb065c4da2587b82bed52b5073bef) | fix(faq): 保留克隆状态同步时的正文和索引状态 (#3993) | 有效变更,按主题归纳 | +| 2026-10-08 | [a8c291c6f](https://github.com/Tencent/WeKnora/commit/a8c291c6ff52985e6729a8b3e0d404add08ecfd3) | fix: keep failed data-analysis table loads retryable (#3745) | 有效变更,按主题归纳 | +| 2026-10-08 | [27b9ee74a](https://github.com/Tencent/WeKnora/commit/27b9ee74a02f2f33689d0adb2de091c5bd8d5342) | fix(storage): use virtual-hosted addressing for Tencent COS through the S3 driver (#3722) | 有效变更,按主题归纳 | +| 2026-10-08 | [a15dfdd94](https://github.com/Tencent/WeKnora/commit/a15dfdd941497b32198f8abaec71510b304ee070) | fix(summary): 坏 JSON 不再冒充文档摘要(截断/畸形 JSON 走失败路径,纯文本兜底保留) (#3769) | 有效变更,按主题归纳 | +| 2026-10-08 | [e915adb14](https://github.com/Tencent/WeKnora/commit/e915adb147d721fc265b22db24a56a535b5bcf6c) | fix(chunker): preserve source offsets for table child chunks (#3969) | 有效变更,按主题归纳 | +| 2026-10-08 | [98feef38d](https://github.com/Tencent/WeKnora/commit/98feef38de5c39e57ef1c817e43ef6a4879f4029) | fix(chunker): count an escaped pipe as cell text when matching table widths (#3979) | 有效变更,按主题归纳 | +| 2026-10-08 | [0d3a053eb](https://github.com/Tencent/WeKnora/commit/0d3a053eb62c5150c8ad01442776de0225d06ea2) | fix(yuque): don't acknowledge failed detail fetches in the incremental cursor (#3702) | 有效变更,按主题归纳 | +| 2026-10-08 | [b5c74b2dd](https://github.com/Tencent/WeKnora/commit/b5c74b2dd6f183f1e31ef98a166696664b716570) | fix(feishu): 多维表格字段分页补重复 page_token 防护与条数上限 (#3840) | 有效变更,按主题归纳 | +| 2026-10-08 | [a2aeb97a0](https://github.com/Tencent/WeKnora/commit/a2aeb97a01203b23b6093eba2369583b460aaa66) | fix(gitlab): 分页循环补重复页防护与跳数上限 (#3841) | 有效变更,按主题归纳 | +| 2026-10-08 | [a6c6c35ad](https://github.com/Tencent/WeKnora/commit/a6c6c35ad292716570c44a42221f9e5ec68d2543) | fix(ima): 三条游标分页循环补重复游标防护与跳数上限 (#3889) | 有效变更,按主题归纳 | +| 2026-10-08 | [c9723b119](https://github.com/Tencent/WeKnora/commit/c9723b1198bfa42d31278b4e44f1199593ee5a08) | fix(docreader): read EPUB chapters in spine order (#3977) | 有效变更,按主题归纳 | +| 2026-10-08 | [9de0946e5](https://github.com/Tencent/WeKnora/commit/9de0946e53348d063180b2af87008a51c4fd9dcc) | fix(docparser): anydoc 内嵌 EMF/WMF 图片的扩展名与 Rust 侧对齐 (#3938) | 有效变更,按主题归纳 | +| 2026-10-08 | [188d9026d](https://github.com/Tencent/WeKnora/commit/188d9026d8d344464676c7919c09730a5181adb6) | fix(models): honor OpenRouter native thinking for legacy defaults (#3807) | 有效变更,按主题归纳 | +| 2026-10-08 | [f6119ae5f](https://github.com/Tencent/WeKnora/commit/f6119ae5fd4032e00a621a2cc280972390d0cfa4) | fix(agent): 保留数据分析 SQL 字符串字面量 (#3812) | 有效变更,按主题归纳 | +| 2026-10-08 | [52893006a](https://github.com/Tencent/WeKnora/commit/52893006ad26558164ddceabce89360a1b17b984) | fix(agent): validate tool string lengths by Unicode code points (#3937) | 有效变更,按主题归纳 | +| 2026-10-08 | [fa4f85d3d](https://github.com/Tencent/WeKnora/commit/fa4f85d3dd1edba7689a3e235abd3f159b2af381) | fix(agent): 拒绝将断流摘要保存为记忆检查点 (#3994) | 有效变更,按主题归纳 | +| 2026-10-08 | [e394c7ade](https://github.com/Tencent/WeKnora/commit/e394c7adecbe38019f66b8490ee06d254efaa05a) | fix(agent): 工具自起 goroutine 的 panic 自行兜底,MCP 预热不再带走进程 (#3846) | 有效变更,按主题归纳 | +| 2026-10-08 | [412ce63f0](https://github.com/Tencent/WeKnora/commit/412ce63f0b00ab45811f81b0ca254259e205acca) | fix(chat): clear stale file and tool selections on session restore (#3802) | 有效变更,按主题归纳 | +| 2026-10-08 | [f55947349](https://github.com/Tencent/WeKnora/commit/f559473498719ff0f5c94fc9c6918199986aaf3e) | fix(mcp): keep the client secret from dynamic client registration (#3763) | 有效变更,按主题归纳 | +| 2026-10-08 | [28734725a](https://github.com/Tencent/WeKnora/commit/28734725a3567d5d12a0b190b0e5bccbb91b252c) | fix(mcp): reconnect after the server forgets the session (#3765) | 有效变更,按主题归纳 | +| 2026-10-08 | [172d0a85a](https://github.com/Tencent/WeKnora/commit/172d0a85ab17e74abe8f987927ad1b9fd3eeb29a) | fix(mcp): pass embedded resources in tool results to the agent (#3766) | 有效变更,按主题归纳 | +| 2026-10-08 | [e8cc9c763](https://github.com/Tencent/WeKnora/commit/e8cc9c763e639749bab486a0fc291d91c6b09597) | fix(mcp): include shared knowledge bases in endpoint scope (#3848) | 有效变更,按主题归纳 | +| 2026-10-08 | [69a7fd993](https://github.com/Tencent/WeKnora/commit/69a7fd9931a0867dd7e1003262b315a330e5d606) | fix(mcp): close legacy chat responses on HTTP errors (#3930) | 有效变更,按主题归纳 | +| 2026-10-08 | [c0c194f62](https://github.com/Tencent/WeKnora/commit/c0c194f6253ba38ddfc868767bda21fd6f4ea900) | fix(im/wecom): preserve image in mixed messages with text captions (#3901) | 有效变更,按主题归纳 | +| 2026-10-08 | [95691daab](https://github.com/Tencent/WeKnora/commit/95691daab2e292a8c45e0ae200737b1c9e5de222) | fix(knowledge): retry document processing after transient indexing failures (#3915) | 有效变更,按主题归纳 | +| 2026-10-08 | [fac9ebabf](https://github.com/Tencent/WeKnora/commit/fac9ebabf2d4578f6192528b1e68f69af48d9a96) | fix(knowledge): close spans left open on terminal rows and superseded attempts (#3855) | 有效变更,按主题归纳 | +| 2026-10-08 | [4d7e66312](https://github.com/Tencent/WeKnora/commit/4d7e663128e70f4f4ba496f062fc5a7c23633358) | fix(wiki): preserve pending work when source lookups fail (#3715) | 有效变更,按主题归纳 | +| 2026-10-08 | [626185a12](https://github.com/Tencent/WeKnora/commit/626185a120ef55a741c5add46147c0af146c18aa) | fix(wiki): 重建链接逐页写失败不再静默,半成品不再回 200 (#3884) | 有效变更,按主题归纳 | +| 2026-10-08 | [11bfacad9](https://github.com/Tencent/WeKnora/commit/11bfacad97c7748542a988717bd3f4ffc53244b4) | chore(deps): bump the cli-deps group in /cli with 2 updates (#3920) | 构建/测试/文档或体验调整 | +| 2026-10-08 | [3206e15e8](https://github.com/Tencent/WeKnora/commit/3206e15e831672f0ae0d837d822150ca19415594) | fix(docs): make `make docs` reproduce the committed Swagger again (#3751) | 有效变更,按主题归纳 | +| 2026-10-08 | [9d4cc233c](https://github.com/Tencent/WeKnora/commit/9d4cc233c68a3f3e7ee7fd81926708dd5c898b36) | feat(ui): add search to Skills and MCP toolbox lists (#3731) | 有效变更,按主题归纳 | +| 2026-10-08 | [4ea94afcb](https://github.com/Tencent/WeKnora/commit/4ea94afcb91b7f2388d9440495f30cf555e88a5b) | fix(cli): propagate paginated response read errors (#3983) | 有效变更,按主题归纳 | +| 2026-10-08 | [4a0c7fa91](https://github.com/Tencent/WeKnora/commit/4a0c7fa91f2f646e6f56181ba723a9eebf368ed9) | fix(cli): render paginated API results in text mode (#3984) | 有效变更,按主题归纳 | +| 2026-10-08 | [7d75ce3a6](https://github.com/Tencent/WeKnora/commit/7d75ce3a6f871ae59668b440439ea27a9959c351) | fix(client): make multipart uploads replayable (#3989) | 有效变更,按主题归纳 | +| 2026-10-08 | [cefd5920f](https://github.com/Tencent/WeKnora/commit/cefd5920f885b604cc760478e9dd87b5778a272e) | fix(cli): apply list limits after filtering and sorting (#3990) | 有效变更,按主题归纳 | +| 2026-10-08 | [ff3318443](https://github.com/Tencent/WeKnora/commit/ff33184433c438eea0ec40293289b819fa817c97) | fix(cli): preserve integer precision in jq output (#3991) | 有效变更,按主题归纳 | +| 2026-10-08 | [b413023d2](https://github.com/Tencent/WeKnora/commit/b413023d2885742048103d4d617922465788c0f2) | fix(cli): classify wrapped SDK HTTP errors correctly (#3992) | 有效变更,按主题归纳 | +| 2026-10-08 | [562127c65](https://github.com/Tencent/WeKnora/commit/562127c6542d9f3f073f390658cb67ae65b97484) | fix(client): accept optional spaces in SSE event fields (#3975) | 有效变更,按主题归纳 | +| 2026-10-08 | [b8d83eab1](https://github.com/Tencent/WeKnora/commit/b8d83eab1cf426d19c8e0183b9d896b77a62872b) | fix(skills): skip vendored dep trees in install verification script enumeration (#3943) | 有效变更,按主题归纳 | +| 2026-10-08 | [dad81cb8c](https://github.com/Tencent/WeKnora/commit/dad81cb8c10c52efd5d70dfe1abcc9f0c5672c99) | fix(sandbox): reclassify exec races with the idle sweep as NotFound so rebinding heals (#3980) | 有效变更,按主题归纳 | +| 2026-10-08 | [20038cbda](https://github.com/Tencent/WeKnora/commit/20038cbda6e3c810b4ab3951d56bbcf8f81af19c) | fix(asynqdl): truncate dead-letter errors on a rune boundary (#3964) | 有效变更,按主题归纳 | +| 2026-10-08 | [6057a8101](https://github.com/Tencent/WeKnora/commit/6057a81017375a8d680cd32afca1c2ff03b0b17c) | fix(middleware): stop buffering whole request bodies in the access log (#3927) | 有效变更,按主题归纳 | +| 2026-10-08 | [5077f3580](https://github.com/Tencent/WeKnora/commit/5077f3580003bcf55eeb89694d43479ca216adae) | fix(notion): 超过 block 上限截断时补 Warn,避免内容与子页面静默缺失 (#3771) | 有效变更,按主题归纳 | +| 2026-10-08 | [dabbdaf15](https://github.com/Tencent/WeKnora/commit/dabbdaf156b8dfcb58dd68e9c0be3842d27d72b5) | fix(notion): 分页循环补重复游标防护与跳数上限 (#3890) | 有效变更,按主题归纳 | +| 2026-10-08 | [e7aaf8ae0](https://github.com/Tencent/WeKnora/commit/e7aaf8ae02608d1d9e0f84aa864106a5f1ae78a3) | fix(docreader): keep the space held by a whitespace-only inline element (#3978) | 有效变更,按主题归纳 | +| 2026-10-08 | [336f84c3b](https://github.com/Tencent/WeKnora/commit/336f84c3be4a4831c49b2708f98431dae2ab3312) | fix(data-analysis): skip style-only worksheets before DuckDB loading (#3660) | 有效变更,按主题归纳 | +| 2026-10-08 | [4dd19b535](https://github.com/Tencent/WeKnora/commit/4dd19b535603d4a9dc8b64033192592572db5180) | fix(frontend): render single tilde literally instead of GFM strikethrough (#3963) | 有效变更,按主题归纳 | +| 2026-10-08 | [4eb23a856](https://github.com/Tencent/WeKnora/commit/4eb23a85607c0cabfa050f5e87eb71fb0ce2554c) | fix(qdrant): CopyIndices 用服务端返回的 next_page_offset 翻页,不再按页尾 id 回填 (#3882) | 有效变更,按主题归纳 | +| 2026-10-08 | [e6ecb9adc](https://github.com/Tencent/WeKnora/commit/e6ecb9adcc8ddbb500957f77490ca5cb4c2fa8d4) | fix(dataset): allow selecting the QA answer model (#3944) | 有效变更,按主题归纳 | +| 2026-10-08 | [49e262147](https://github.com/Tencent/WeKnora/commit/49e262147ca504a28680930930ed0851a622d0c5) | fix(cli): preserve directory structure in doc upload --recursive (#3753) | 有效变更,按主题归纳 | +| 2026-10-08 | [de2dfd303](https://github.com/Tencent/WeKnora/commit/de2dfd3034a7b506fa269910401bbdcbd4efc71d) | fix(multimodal): bound remote image downloads by the file size limit (#3906) | 有效变更,按主题归纳 | +| 2026-10-08 | [cbfd66fd9](https://github.com/Tencent/WeKnora/commit/cbfd66fd922df3632448e0bfd5925a6c10196fc8) | fix(knowledge): delete written chunks when the storage quota check fails (#3656) | 有效变更,按主题归纳 | +| 2026-10-08 | [11aa00f85](https://github.com/Tencent/WeKnora/commit/11aa00f85f22ee54a6c37963010ac3f4d20d694b) | fix(agent): preserve untouched numeric tool arguments during casting (#3936) | 有效变更,按主题归纳 | +| 2026-10-08 | [9a2cd2006](https://github.com/Tencent/WeKnora/commit/9a2cd200637359081d87fb4c51b6bc911a0ff6a2) | fix(frontend): keep target="_blank" on sanitized markdown links (#3818) | 有效变更,按主题归纳 | +| 2026-10-08 | [a75e8e9ac](https://github.com/Tencent/WeKnora/commit/a75e8e9ac0ac10ea23c3108e789a8d71f6f071e9) | fix(datasource): 语雀/Notion/IMA/飞书连接器 API 响应体补体积上限 (#3985) | 有效变更,按主题归纳 | +| 2026-10-08 | [b5fd79edf](https://github.com/Tencent/WeKnora/commit/b5fd79edf283f4ac6a272403f231c3c07db11500) | fix(model): treat 400 as reachable in chat connection test again (#3929) | 有效变更,按主题归纳 | +| 2026-10-08 | [1826f46b1](https://github.com/Tencent/WeKnora/commit/1826f46b1217867fe15f188706a9334cacec4165) | fix(docparser): 云解析超时改为跟随既有配置,不再硬编码 (#3891) | 有效变更,按主题归纳 | +| 2026-10-08 | [99b4c3a9b](https://github.com/Tencent/WeKnora/commit/99b4c3a9b0d3c2d3440036c6e3f4235c6f276390) | feat(rerank): support Hugging Face TEI protocol (#3956) | 有效变更,按主题归纳 | +| 2026-10-08 | [d84cdabac](https://github.com/Tencent/WeKnora/commit/d84cdabac49046dc546ba04716afcc3785240a88) | fix(rss): refresh titles and source links when article text is unchanged (#3824) | 有效变更,按主题归纳 | +| 2026-10-08 | [bea0d7b68](https://github.com/Tencent/WeKnora/commit/bea0d7b6891ccbf94d3e1c6f649a3a6092978a12) | fix(docreader): preserve PPTX fallback image associations (#3973) | 有效变更,按主题归纳 | +| 2026-10-08 | [3fb6b9d63](https://github.com/Tencent/WeKnora/commit/3fb6b9d631d399104778cf8d4a79facd23ed8853) | fix(kb): let the update API set vlm_config (#3704) | 有效变更,按主题归纳 | +| 2026-10-08 | [b5c8d90cc](https://github.com/Tencent/WeKnora/commit/b5c8d90cc20747be3f64356150ca69224d063be0) | fix(chat_pipeline): treat non-JSON model refusals as skipped graph extraction (#3606) | 有效变更,按主题归纳 | +| 2026-10-08 | [ae9054626](https://github.com/Tencent/WeKnora/commit/ae90546262a84dcfd90b5da370b56bd0774cc8f2) | fix(frontend): avoid false unsaved changes warnings | 有效变更,按主题归纳 | +| 2026-10-08 | [bcbd65a45](https://github.com/Tencent/WeKnora/commit/bcbd65a459e912f70ad4a9b0f39f8848db4a2d9f) | fix(datasource/dingtalk): Validate 不再因为某个工作区读不到就整库判失败 (#3782) | 有效变更,按主题归纳 | +| 2026-10-08 | [19542f2a1](https://github.com/Tencent/WeKnora/commit/19542f2a1d958d26383bbb586adecae6be07a7d5) | feat(datasource): add Seafile data source connector (#3616) | 有效变更,按主题归纳 | +| 2026-10-08 | [d2bc0df6a](https://github.com/Tencent/WeKnora/commit/d2bc0df6a2af4f953485e69c63972cf7d1cc2646) | feat(i18n): add Traditional Chinese (zh-TW) locale support (#3916) | 有效变更,按主题归纳 | +| 2026-10-08 | [1c528d83d](https://github.com/Tencent/WeKnora/commit/1c528d83de39d79e870fe8b46d21addf20136a60) | fix(i18n): add the zh-TW Seafile strings missing after #3616 and #3916 | 有效变更,按主题归纳 | +| 2026-10-08 | [0de62b2f8](https://github.com/Tencent/WeKnora/commit/0de62b2f801513982291311b59fad381f7959560) | fix(chat): restore citation source navigation and soften highlights | 有效变更,按主题归纳 | +| 2026-10-08 | [a729d1fc8](https://github.com/Tencent/WeKnora/commit/a729d1fc8c1c7e05119b69696ef9f61bc2627cfb) | docs(models): state which rerank limits split requests and which fail the call | 构建/测试/文档或体验调整 | +| 2026-10-08 | [ea7cf8d5d](https://github.com/Tencent/WeKnora/commit/ea7cf8d5d77cf0deb46215836262405ad91d4b44) | fix(models): emit explicit empty content for assistant tool-call turns (#3605) | 有效变更,按主题归纳 | +| 2026-10-08 | [5a25e2614](https://github.com/Tencent/WeKnora/commit/5a25e261421db4c76b720e9d7392bd8f88f36585) | feat(rerank): support Pinecone Inference protocol (#3957) | 有效变更,按主题归纳 | +| 2026-10-08 | [b7f318106](https://github.com/Tencent/WeKnora/commit/b7f31810664e22e44cb6da2dae3b2115c2060f49) | docs: count 29 built-in model vendors and list Hugging Face TEI and Pinecone (#4048) | 构建/测试/文档或体验调整 | +| 2026-10-08 | [0c5d28abb](https://github.com/Tencent/WeKnora/commit/0c5d28abb7917b49d36f79bafb78fb59796a068b) | feat: index and recall images with multimodal embedding models (#3683) | 有效变更,按主题归纳 | +| 2026-10-08 | [676a59307](https://github.com/Tencent/WeKnora/commit/676a59307e5ca7efabfe8896354b9425703aef67) | fix(settings): improve modal sizing and integration page layout | 有效变更,按主题归纳 | +| 2026-10-08 | [2a02807a6](https://github.com/Tencent/WeKnora/commit/2a02807a618a18196ebc1ddbe9888fb742b24117) | fix(chunker): respect Markdown fences during heading detection | 有效变更,按主题归纳 | +| 2026-10-08 | [005627b18](https://github.com/Tencent/WeKnora/commit/005627b180c6c7509660b0a14401e463f48d53f8) | fix(agent): compare tool enum values without string coercion | 有效变更,按主题归纳 | +| 2026-10-09 | [b14bcbcd5](https://github.com/Tencent/WeKnora/commit/b14bcbcd541fc0fdd67eef518828a28302358e18) | fix(notion): 保留正文抓取失败时的同步游标 (#3693) | 有效变更,按主题归纳 | +| 2026-10-09 | [04da26024](https://github.com/Tencent/WeKnora/commit/04da26024c2412b34b3b30e7b283c98197ef95f1) | fix(weaviate): CopyIndices 补游标防护,并修掉 GraphQL 报错时的 panic (#3881) | 有效变更,按主题归纳 | +| 2026-10-09 | [5d40f81ee](https://github.com/Tencent/WeKnora/commit/5d40f81ee4020d8f3173ac64df4dc4ae140351c1) | fix(im): retry Yunzhijia attachment downloads (#3809) | 有效变更,按主题归纳 | +| 2026-10-09 | [419f17fc6](https://github.com/Tencent/WeKnora/commit/419f17fc651de93a34eb3586cb894a9e7f3db4a4) | fix(wiki): resolve titles for unloaded backlinks (#3931) | 有效变更,按主题归纳 | +| 2026-10-09 | [cbfc0fed4](https://github.com/Tencent/WeKnora/commit/cbfc0fed4a1cb4a3ff0ffabe943d6f1edfa3b21e) | fix(chat): 在模型上下文中标注 FILTER_TOP_K 的子集截断,避免把前 N 条当作全集作答 (#3758) | 有效变更,按主题归纳 | +| 2026-10-09 | [abc365f91](https://github.com/Tencent/WeKnora/commit/abc365f919191317020d395e9af19e4129357ff3) | fix(wiki): 唯一写出口 UpdatePage 拦住丢表格行的机器重写(agent 整页写入不再静默改短页面) (#3793) | 有效变更,按主题归纳 | +| 2026-10-09 | [8319d59dd](https://github.com/Tencent/WeKnora/commit/8319d59dd014fccb7daf04eed9d50d8a3ffdecf4) | feat(datasource/dingtalk): 摄取钉钉"上传文件"(docx/pptx/xlsx/pdf) (#3786) | 有效变更,按主题归纳 | +| 2026-10-09 | [09411106f](https://github.com/Tencent/WeKnora/commit/09411106f0ec19e840e9c24cabf391b8c2852a8e) | fix(session): allow tenant admins to manage channel sessions (#3939) | 有效变更,按主题归纳 | +| 2026-10-09 | [3d01bebce](https://github.com/Tencent/WeKnora/commit/3d01bebce3d7aa90aaa52914534f22d9cadf683b) | fix(docreader): resolve EPUB images relative to their chapters (#3924) | 有效变更,按主题归纳 | +| 2026-10-09 | [4243018ff](https://github.com/Tencent/WeKnora/commit/4243018ff1f55ccd92baebf4da0a1057317cc644) | fix(mcp): report advertised directory failures in connection tests (#3905) | 有效变更,按主题归纳 | +| 2026-10-09 | [a1450d382](https://github.com/Tencent/WeKnora/commit/a1450d382e39a06977cc395aaf822eebab87c69e) | fix(knowledge): claim cloned and released document images in the resource catalog (#3752) | 有效变更,按主题归纳 | +| 2026-10-09 | [65f88f412](https://github.com/Tencent/WeKnora/commit/65f88f4121433702ea053ae9127647329bf98b05) | feat: judge image hits by their image in rerank and show them to vision models (#4013) | 有效变更,按主题归纳 | +| 2026-10-09 | [52617f641](https://github.com/Tencent/WeKnora/commit/52617f64106e2ea9af770ff783a1818e1ce7b8fb) | fix(sandbox): omit env overrides when creating Aliyun E2B sandboxes from snapshots (#4054) | 有效变更,按主题归纳 | +| 2026-10-09 | [602d0c388](https://github.com/Tencent/WeKnora/commit/602d0c388bf17d894f467fe0cd65d1d62c73d303) | feat: support app and docreader build download mirrors (#4073) | 有效变更,按主题归纳 | +| 2026-10-10 | [d074ec7b0](https://github.com/Tencent/WeKnora/commit/d074ec7b0b63903f117543e09deb31f5f3d19ecb) | fix(websearch): return results for non-webpage Metaso scopes (#4010) | 有效变更,按主题归纳 | +| 2026-10-10 | [40eb34bc8](https://github.com/Tencent/WeKnora/commit/40eb34bc849cb29dc53ccddef971c9a7c4410f7b) | fix(agent): align web_search count limit with the configured maximum (#4011) | 有效变更,按主题归纳 | +| 2026-10-10 | [c3f077ed1](https://github.com/Tencent/WeKnora/commit/c3f077ed18f6e00aaf705d405023ed88c7c15b27) | fix(models): align configuration and multimodal embedding workflows (#4080) | 有效变更,按主题归纳 | +| 2026-10-10 | [0c71fff2a](https://github.com/Tencent/WeKnora/commit/0c71fff2a387b539c449cd6b66a3922ed6839f76) | fix(sandbox): treat E2B in_progress template builds as building (#4108) | 有效变更,按主题归纳 | +| 2026-10-10 | [6e2e5d8bb](https://github.com/Tencent/WeKnora/commit/6e2e5d8bb07cd9c8db360c03b80ca47ea2e81fd5) | fix(frontend): follow configured upload limit in hints (#4110) | 有效变更,按主题归纳 | +| 2026-10-10 | [097bd475f](https://github.com/Tencent/WeKnora/commit/097bd475f601d48a82ed7aaa2f9676dd82f15d97) | fix(docker): install CA certificates before the browserskill mirror swap (#4104) | 有效变更,按主题归纳 | +| 2026-10-10 | [8125ed250](https://github.com/Tencent/WeKnora/commit/8125ed250f5ea404445e7952359a6ac686d90afc) | fix(chat): keep custom metadata on knowledge-chat references (#4087) | 有效变更,按主题归纳 | +| 2026-10-10 | [d6269994b](https://github.com/Tencent/WeKnora/commit/d6269994b33688c2b85488c24014d95db1948d52) | refactor: 出站拨号超时默认 5s 并改为 env 可配 (WEKNORA_OUTBOUND_DIAL_TIMEOUT) (#4122) | 有效变更,按主题归纳 | +| 2026-10-10 | [03e2c47ae](https://github.com/Tencent/WeKnora/commit/03e2c47aecbf60120820216baaa8abb2e98844f7) | feat(mcp): support 2026-07-28 alongside legacy clients (#4095) | 有效变更,按主题归纳 | +| 2026-10-10 | [e372b8e42](https://github.com/Tencent/WeKnora/commit/e372b8e42ef71f8ba9e1c4ada6546d79ec056f91) | perf(embedding): batch Qwen3-VL message inputs (#4126) | 有效变更,按主题归纳 | +| 2026-10-10 | [8cb53fdbc](https://github.com/Tencent/WeKnora/commit/8cb53fdbc58e4c15aafdba973d65742551e4c9cd) | fix(observability): distinguish retrieval diagnostic spans (#4128) | 有效变更,按主题归纳 | +| 2026-10-10 | [bb878af50](https://github.com/Tencent/WeKnora/commit/bb878af50873b919a68134dc007ba9ae859c6c39) | fix(gallery): improve image detail panel readability (#4130) | 有效变更,按主题归纳 | +| 2026-10-10 | [d27ecade6](https://github.com/Tencent/WeKnora/commit/d27ecade656a1f2335baa2520d2622a297036ea5) | fix(ocr): reject invalid output and record extraction failures (#4132) | 有效变更,按主题归纳 | +| 2026-10-10 | [5f18308b0](https://github.com/Tencent/WeKnora/commit/5f18308b0a39bd44f3b44203c167663d0430a40b) | fix(ocr): reject split repetition and preserve no-text responses (#4135) | 有效变更,按主题归纳 | +| 2026-10-10 | [a58fc1320](https://github.com/Tencent/WeKnora/commit/a58fc13206c7d1e89c784d61189ab67295727744) | fix(chat): smooth streamed citation reveal cadence | 有效变更,按主题归纳 | +| 2026-10-10 | [aa535c22f](https://github.com/Tencent/WeKnora/commit/aa535c22fed1f4ba5c965b7f208361c0b1c2d4e2) | fix(chat): keep queued follow-up answers attached to their own question | 有效变更,按主题归纳 | +| 2026-10-10 | [50a296316](https://github.com/Tencent/WeKnora/commit/50a29631608b9b95c88b4ea98e09867bdbcad991) | fix(preview): refine source citation highlights (#4139) | 有效变更,按主题归纳 | +| 2026-10-10 | [d8fa5b49a](https://github.com/Tencent/WeKnora/commit/d8fa5b49a7f4aa93ded9978c40d1b57346375211) | feat(embed): support pasting screenshots into chat | 有效变更,按主题归纳 | +| 2026-10-10 | [98e9dc078](https://github.com/Tencent/WeKnora/commit/98e9dc078625265ba1ea85ee3538a547f85a5be0) | perf(reranking): accelerate MMR selection with sparse postings | 有效变更,按主题归纳 | +| 2026-10-10 | [54e8d7ffd](https://github.com/Tencent/WeKnora/commit/54e8d7ffde31ccc00ea59cec7b2eaec18b01f137) | fix(mcp): 隔离慢连接清理对其他服务的阻塞 | 有效变更,按主题归纳 | +| 2026-10-10 | [dccb1d6d2](https://github.com/Tencent/WeKnora/commit/dccb1d6d2c974062976e8b8841c46bbddb06d226) | fix(mcp): stop advertising read-only endpoint tools as destructive | 有效变更,按主题归纳 | +| 2026-10-10 | [de616ed4b](https://github.com/Tencent/WeKnora/commit/de616ed4b7d2a6e55c9d380bd6068f792fe9f3a1) | test(service): assert RRF ranks ignore list arrival order | 构建/测试/文档或体验调整 | +| 2026-10-10 | [1a21af1b8](https://github.com/Tencent/WeKnora/commit/1a21af1b827072589eddcc9def0b91433399480c) | fix(mcp): preserve structured tool results for agents | 有效变更,按主题归纳 | +| 2026-10-10 | [d9237166c](https://github.com/Tencent/WeKnora/commit/d9237166cc4cb618818d2e65e62f820f1cc03f24) | fix(im/wecom): accept custom wss long-connection endpoints behind SSRF host checks | 有效变更,按主题归纳 | +| 2026-10-10 | [def582b98](https://github.com/Tencent/WeKnora/commit/def582b98a2960ceb53d7051f27b90014c08858f) | test(im/wecom): satisfy errcheck and lll in endpoint tests | 构建/测试/文档或体验调整 | +| 2026-10-10 | [769a5aeca](https://github.com/Tencent/WeKnora/commit/769a5aeca84331b1f1f5ad5f3b93934ec33d4fbf) | fix(frontend): preserve the caret when outdenting Markdown lists | 有效变更,按主题归纳 | +| 2026-10-10 | [57f8a65fe](https://github.com/Tencent/WeKnora/commit/57f8a65fec7b86fb20aa2c19a0e21b67a3864c73) | fix(datasource/dingtalk): tighten Validate sampling edges (#4079) | 有效变更,按主题归纳 | +| 2026-10-10 | [932b750b2](https://github.com/Tencent/WeKnora/commit/932b750b2f5ef1ce2537ac57a117dec7423f46ab) | fix(agent): preserve steering order across persistence failures (#4078) | 有效变更,按主题归纳 | +| 2026-10-10 | [0466c294e](https://github.com/Tencent/WeKnora/commit/0466c294ef1ad728e889058d331a5cfc37b2bd23) | fix(agent): 将空闲超时覆盖到模型流建立阶段 | 有效变更,按主题归纳 | +| 2026-10-10 | [3f9af2afa](https://github.com/Tencent/WeKnora/commit/3f9af2afa912e16ebaec1ae172963a99dfc2e419) | fix(sqlite): add MCP metadata migration | 有效变更,按主题归纳 | +| 2026-10-10 | [45a022aac](https://github.com/Tencent/WeKnora/commit/45a022aac23448e270f23046c9018cf8b2e37761) | fix: wait for qdrant writes to finish | 有效变更,按主题归纳 | +| 2026-10-10 | [89e3273da](https://github.com/Tencent/WeKnora/commit/89e3273daf3c11f1a4498183b75c8257efd8db6c) | fix(mcp): preserve disabled state on service creation | 有效变更,按主题归纳 | +| 2026-10-10 | [0d39af121](https://github.com/Tencent/WeKnora/commit/0d39af1214ff9d02382a4e851d320f5be8957985) | fix(retrieval): skip KB retrieval for summarize intent | 有效变更,按主题归纳 | +| 2026-10-10 | [a6327f8e3](https://github.com/Tencent/WeKnora/commit/a6327f8e39fe62b299348e16a9bc81763c0fcf00) | fix(i18n): correct Korean username rule message to match the pattern | 有效变更,按主题归纳 | +| 2026-10-10 | [b1d92048c](https://github.com/Tencent/WeKnora/commit/b1d92048cf61d732a6cd9171237c8d05770183e1) | fix(agent): account for file paths in read pagination budgets | 有效变更,按主题归纳 | +| 2026-10-10 | [54cb6e9f9](https://github.com/Tencent/WeKnora/commit/54cb6e9f9be8cf486bb88b62916f13e16351f9a5) | test(docreader): add unit tests for utils.split text-splitting helpers | 构建/测试/文档或体验调整 | +| 2026-10-10 | [150d8cc60](https://github.com/Tencent/WeKnora/commit/150d8cc605ed9305a5fc4ad1b8789dae238decce) | feat(sandbox): Docker 后端支持交互式终端 (#4023) | 有效变更,按主题归纳 | +| 2026-10-11 | [231a5c0b1](https://github.com/Tencent/WeKnora/commit/231a5c0b15b817bb13ee3a876c3fbaf337cb4d5e) | feat(wiki): improve graph layout, theme captions and group focus (#4147) | 有效变更,按主题归纳 | +| 2026-10-11 | [d2dbf7209](https://github.com/Tencent/WeKnora/commit/d2dbf7209963f0a9f6fafb70358ef9baec999aa3) | style: polish sidebar, list pages, toolbox and citation UI (#4154) | 构建/测试/文档或体验调整 | +| 2026-10-11 | [17dc7da51](https://github.com/Tencent/WeKnora/commit/17dc7da514e1fd86f6c2fe77ab05c799cf34c27a) | feat(gallery): replace pagination with infinite masonry scrolling (#4156) | 有效变更,按主题归纳 | +| 2026-10-11 | [643f64180](https://github.com/Tencent/WeKnora/commit/643f64180eb1898a7a2e32d517ff73f978d5448f) | feat(system): add platform user management and streamline settings (#4153) | 有效变更,按主题归纳 | +| 2026-10-11 | [5343ac47b](https://github.com/Tencent/WeKnora/commit/5343ac47b730d451ad267004530084e08a5f599b) | fix(models): stop sending temperature to Claude models that reject it (#4155) | 有效变更,按主题归纳 | +| 2026-10-11 | [00474f734](https://github.com/Tencent/WeKnora/commit/00474f734d6c7c0911d7485465d7c7286d0047cb) | fix: align settings layouts and tolerate existing migration objects (#4164) | 有效变更,按主题归纳 | +| 2026-10-12 | [9efe94cc6](https://github.com/Tencent/WeKnora/commit/9efe94cc6f6d623590098f1fb355dd1f2e63b8f5) | feat(models): add Claude Opus 5.5, Sonnet 5.5 and Haiku 5.5 to the catalog (#4158) | 有效变更,按主题归纳 | +| 2026-10-12 | [d272a83cf](https://github.com/Tencent/WeKnora/commit/d272a83cfc5d4a92aa3655f6a6c806aa40a34c70) | fix(deploy): pass WEKNORA_OUTBOUND_DIAL_TIMEOUT through to the app container (#4157) | 有效变更,按主题归纳 | +| 2026-10-12 | [be581c41e](https://github.com/Tencent/WeKnora/commit/be581c41e0f17db25fd50493c345a5c43a8db138) | fix(mcp): close only the authorizing user's connection after OAuth (#4138) | 有效变更,按主题归纳 | +| 2026-10-12 | [21ef506fc](https://github.com/Tencent/WeKnora/commit/21ef506fc995259e48680477ce8eb06556bbd957) | fix(agent): scope database queries to authorized shared knowledge bases (#4136) | 有效变更,按主题归纳 | +| 2026-10-12 | [3c36cb19a](https://github.com/Tencent/WeKnora/commit/3c36cb19a2bb4214835cf8e5d520d4aa64ac8f23) | fix(deploy): bump paradedb image to v0.25.11-pg17 (#4120) | 有效变更,按主题归纳 | +| 2026-10-12 | [c6bfe8189](https://github.com/Tencent/WeKnora/commit/c6bfe81894be411c910ad573bd1c80d88452414b) | feat(helm): allow Service name overrides with matching consumer references (#4109) | 有效变更,按主题归纳 | +| 2026-10-12 | [e5f9f9dea](https://github.com/Tencent/WeKnora/commit/e5f9f9deab36898676fe85a9fda6b3e6f00288fa) | feat(rerank): add Cohere provider for the v2 rerank API | 有效变更,按主题归纳 | +| 2026-10-12 | [fe444c851](https://github.com/Tencent/WeKnora/commit/fe444c851ef4430bcdcbef4cb10342839c57807f) | fix(feishu): add shared request pacing and improve HTTP 429 / error 99991400 retries in Feishu Wiki synchronization (#4039) | 有效变更,按主题归纳 | +| 2026-10-12 | [24b5ca3f2](https://github.com/Tencent/WeKnora/commit/24b5ca3f2325e28acb4122384459ca66acc85ef4) | docs: clarify frontend development proxy configuration (#4171) | 构建/测试/文档或体验调整 | +| 2026-10-12 | [7925f774d](https://github.com/Tencent/WeKnora/commit/7925f774d1baa72e8244b5fc65324542049677a8) | fix(datasource/gitlab): emptied files no longer leave their old body searchable (#4008) | 有效变更,按主题归纳 | +| 2026-10-12 | [9b031a657](https://github.com/Tencent/WeKnora/commit/9b031a657656cddaddafe3cb2e124ccfc2f0693e) | fix: accept qdrant collection created concurrently (#3999) | 有效变更,按主题归纳 | +| 2026-10-12 | [7982c6a3b](https://github.com/Tencent/WeKnora/commit/7982c6a3bda4b91da402faf39ca381cabd4832ca) | fix(agent): accept adjacent prefixed Python string literals (#4006) | 有效变更,按主题归纳 | +| 2026-10-12 | [6a7094cea](https://github.com/Tencent/WeKnora/commit/6a7094ceacd3d9844ab9f2ad9083075e1f7cd088) | fix(mcp): bound resource listing pagination (#4007) | 有效变更,按主题归纳 | +| 2026-10-12 | [ecdcd14e1](https://github.com/Tencent/WeKnora/commit/ecdcd14e1db5452e929ea846b0a1677502f81464) | docs: refresh LICENSE third-party notices (#4178) | 构建/测试/文档或体验调整 | +| 2026-10-12 | [c2edec192](https://github.com/Tencent/WeKnora/commit/c2edec192b5b4abbe77c0e210b3e5abfb51792cc) | docs: explain knowledge upload folder paths (#4177) | 构建/测试/文档或体验调整 | +| 2026-10-12 | [089711f92](https://github.com/Tencent/WeKnora/commit/089711f92c50ecad782ab95dbce8b04278a9cb35) | fix(mcp): ignore discover probe in resource list tests (#4179) | 有效变更,按主题归纳 | +| 2026-10-12 | [98362dd29](https://github.com/Tencent/WeKnora/commit/98362dd29698f4b78df5d8ecf3f5020517e50ddc) | feat(gallery): filter images by source document (#4159) | 有效变更,按主题归纳 | +| 2026-10-12 | [1c54beb55](https://github.com/Tencent/WeKnora/commit/1c54beb551673f15c6054ffb7f224a4bfdb495e3) | refactor(gallery): turn source document filter into a toolbar popover (#4190) | 有效变更,按主题归纳 | +| 2026-10-12 | [ef54e835c](https://github.com/Tencent/WeKnora/commit/ef54e835c907718cedf7316bfa93daf69a28b2ba) | docs(api): clarify knowledge-search scope union of knowledge_base_ids and knowledge_ids (#4191) | 构建/测试/文档或体验调整 | +| 2026-10-12 | [8fae51c64](https://github.com/Tencent/WeKnora/commit/8fae51c64084a5cc938eadb32d27c61eea4f4d87) | style(frontend): polish knowledge base settings hints and sub-sections (#4193) | 构建/测试/文档或体验调整 | +| 2026-10-12 | [fd4cc4584](https://github.com/Tencent/WeKnora/commit/fd4cc4584884f7d21d8949d40de5404aa6b14a40) | fix(frontend): respect Markdown indentation selection boundaries (#4195) | 有效变更,按主题归纳 | +| 2026-10-12 | [97796c637](https://github.com/Tencent/WeKnora/commit/97796c637aa53713edc846bd0a39470d687f0fdf) | fix(helm): configure app rollouts and document shared storage (#4180) | 有效变更,按主题归纳 | +| 2026-10-13 | [809bda7b2](https://github.com/Tencent/WeKnora/commit/809bda7b2f2d44952eaa8765d91e3eb666a42c1c) | fix(agent): make agent tool selection match the tools the runtime registers (#4211) | 有效变更,按主题归纳 | +| 2026-10-13 | [194bffbb0](https://github.com/Tencent/WeKnora/commit/194bffbb0a2b07a9a4bcf35355d18ef56dc6535b) | feat(agent): read chat attachments on demand (#4203) | 有效变更,按主题归纳 | +| 2026-10-13 | [e0712df3e](https://github.com/Tencent/WeKnora/commit/e0712df3e020c3b9744a333cfa102b5a6e6371f7) | feat(mcp): let callers without a browser obtain MCP OAuth tokens (#4229) | 有效变更,按主题归纳 | +| 2026-10-13 | [ec382d791](https://github.com/Tencent/WeKnora/commit/ec382d79114cef327da3f857004077f725da110c) | fix(frontend): preserve inline images in EPUB previews (#4226) | 有效变更,按主题归纳 | +| 2026-10-13 | [a7a5f4762](https://github.com/Tencent/WeKnora/commit/a7a5f47625f31698897a62c152b1e186c95b43c7) | fix(frontend): preserve nonempty lists when pressing Enter (#4224) | 有效变更,按主题归纳 | +| 2026-10-13 | [7972cdd25](https://github.com/Tencent/WeKnora/commit/7972cdd251acdb599eb41dcb66ad312982f82360) | fix(knowledge): make the knowledge base description token budget configurable (#4230) | 有效变更,按主题归纳 | +| 2026-10-13 | [621bc9b98](https://github.com/Tencent/WeKnora/commit/621bc9b98ad19b32f553da83f6cbb14f7f74a4d6) | fix(website-docs): prebundle fastdom when mermaid imports it (#4208) | 有效变更,按主题归纳 | +| 2026-10-13 | [8af7938ae](https://github.com/Tencent/WeKnora/commit/8af7938aeddfaaf55fb0578817482a3468f2a045) | fix(mcp): keep OAuth token expiry independent of the process time zone (#4207) | 有效变更,按主题归纳 | +| 2026-10-13 | [94fae6de4](https://github.com/Tencent/WeKnora/commit/94fae6de43a36e44d64aecbbdf19c0b72b352aa8) | feat(models): add WeMM embedding presets and Transformers serving (#4238) | 有效变更,按主题归纳 | +| 2026-10-13 | [4356f8c16](https://github.com/Tencent/WeKnora/commit/4356f8c16dcd5cae85652e9afebf63dc280334fc) | fix(skill): do not fail installs on non-blocking observations (#4246) | 有效变更,按主题归纳 | +| 2026-10-13 | [e51dee829](https://github.com/Tencent/WeKnora/commit/e51dee8297e10db8b0037a8e0cf5d684010cea44) | feat(chat): polish rewind confirm and mark sessions with unread replies (#4247) | 有效变更,按主题归纳 | +| 2026-10-13 | [2511a1f93](https://github.com/Tencent/WeKnora/commit/2511a1f932a7a0dc0e9a04edb62986df0b147cca) | fix(mcp): offer OAuth prompt after tool approval and tidy tools panel (#4248) | 有效变更,按主题归纳 | +| 2026-10-13 | [923822086](https://github.com/Tencent/WeKnora/commit/92382208674ae1b9a2dd62ac0fa98d67ce348bfe) | feat(chat): add global search to the @ mention menu and align its styling (#4249) | 有效变更,按主题归纳 | +| 2026-10-13 | [31c605568](https://github.com/Tencent/WeKnora/commit/31c6055687d33f9ad7a92cf453a264ce13a1700d) | feat(agent): name the turn's chat model on the completion event (#4252) | 有效变更,按主题归纳 | diff --git a/docs/swagger.json b/docs/swagger.json index 458c7edd..44208bad 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -775,31 +775,47 @@ } } }, - "/api/v1/knowledge/{id}/spans": { + "/artifacts": { "get": { - "description": "返回该知识在解析流水线的 trace tree(root → stage → subspan):每段状态、耗时、input/output、错误码、langfuse_trace_id。支持 ?attempt=N 查看历史尝试;不传则返回最新尝试。前端用于渲染时间线 + 多模态/embedding 子节点 + 一键跳转 Langfuse。", - "consumes": [ - "application/json" + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } ], + "description": "跨会话列出当前用户可见会话中技能生成的文件,每个文件只返回最新版本(不含存储 URL)", "produces": [ "application/json" ], "tags": [ - "知识管理" + "会话" ], - "summary": "获取知识文档解析的 Span 树(含历史尝试)", + "summary": "列出我的产物", "parameters": [ { "type": "string", - "description": "知识ID", - "name": "id", - "in": "path", - "required": true + "description": "按文件名过滤", + "name": "keyword", + "in": "query" + }, + { + "type": "string", + "description": "逗号分隔的扩展名,如 .pdf,.pptx", + "name": "file_types", + "in": "query" }, { "type": "integer", - "description": "指定尝试号;省略=最新", - "name": "attempt", + "description": "页码", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "每页数量(最大 100)", + "name": "page_size", "in": "query" } ], @@ -812,6 +828,65 @@ } } } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除产物库中的一个文件。产物库一行代表一个文件的最新版本,默认连同该文件在本会话中的所有历史版本一并删除", + "produces": [ + "application/json" + ], + "tags": [ + "会话" + ], + "summary": "删除产物库中的文件", + "parameters": [ + { + "type": "string", + "description": "会话ID", + "name": "session_id", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "消息ID", + "name": "message_id", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "产物在消息中的位置", + "name": "index", + "in": "query", + "required": true + }, + { + "type": "boolean", + "description": "是否删除所有版本,默认 true", + "name": "all_versions", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } } }, "/auth/auto-setup": { @@ -1338,7 +1413,7 @@ }, "/auth/register-by-invite": { "post": { - "description": "通过 Owner 生成的共享邀请链接 token 完成注册,绕过 invite_only 模式拦截。\n注册者自填邮箱(与 token 不绑定);注册成功后自动加入对应空间。", + "description": "通过共享邀请链接 token 完成注册,仅 self_serve / invite_register 模式允许。\n注册者自填邮箱(与 token 不绑定);注册成功后自动加入对应空间。", "consumes": [ "application/json" ], @@ -1373,6 +1448,12 @@ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" } }, + "403": { + "description": "注册功能已禁用", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + }, "409": { "description": "邮箱已注册", "schema": { @@ -2659,7 +2740,7 @@ "ApiKeyAuth": [] } ], - "description": "更新指定 IM 渠道的名称、模式、知识库、凭证或启用状态", + "description": "更新指定 IM 渠道的名称、模式、回复语言、知识库、凭证或启用状态", "consumes": [ "application/json" ], @@ -2679,7 +2760,7 @@ "required": true }, { - "description": "更新字段(name/mode/output_mode/knowledge_base_id/credentials/enabled)", + "description": "更新字段(含 locale)", "name": "request", "in": "body", "required": true, @@ -4932,7 +5013,7 @@ "ApiKeyAuth": [] } ], - "description": "在知识库中执行向量和关键词混合搜索。推荐使用 POST;GET 携带 JSON 请求体仍受支持(兼容旧客户端)。", + "description": "底层召回:向量+关键词混合检索,默认不 rerank(可用 rerank 字段开启);一般检索请用 /knowledge-search。推荐 POST,GET 带 JSON 体仅兼容旧客户端。", "consumes": [ "application/json" ], @@ -4997,7 +5078,7 @@ "ApiKeyAuth": [] } ], - "description": "在知识库中执行向量和关键词混合搜索。推荐使用 POST;GET 携带 JSON 请求体仍受支持(兼容旧客户端)。", + "description": "底层召回:向量+关键词混合检索,默认不 rerank(可用 rerank 字段开启);一般检索请用 /knowledge-search。推荐 POST,GET 带 JSON 体仅兼容旧客户端。", "consumes": [ "application/json" ], @@ -5054,6 +5135,166 @@ } } }, + "/knowledge-bases/{id}/images": { + "get": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "浏览某知识库内的全部图片资产,支持关键字搜索(caption/OCR 文本)、按图片属性筛选(attr_filters / attr_rules)与排序分页。", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "knowledge" + ], + "summary": "列出知识库图片资产", + "parameters": [ + { + "type": "string", + "description": "知识库 ID", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "页码,默认 1", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "每页数量,默认 20,最大 1000", + "name": "page_size", + "in": "query" + }, + { + "type": "string", + "description": "关键字,对 search_in 指定字段做不区分大小写的子串匹配", + "name": "keyword", + "in": "query" + }, + { + "type": "string", + "description": "参与搜索的属性 ID(逗号分隔);须为 in_searchfield=true", + "name": "search_in", + "in": "query" + }, + { + "type": "string", + "description": "排序属性 ID;须为 in_sortfield=true,默认 created_at", + "name": "sort_by", + "in": "query" + }, + { + "type": "string", + "description": "排序方向:asc / desc,默认 desc", + "name": "sort_order", + "in": "query" + }, + { + "type": "boolean", + "description": "仅包含启用状态的图片", + "name": "is_enabled", + "in": "query" + }, + { + "type": "string", + "description": "来源文档 ID 列表(逗号分隔,最多 50 个),仅返回这些文档的图片", + "name": "knowledge_ids", + "in": "query" + }, + { + "type": "string", + "description": "属性筛选 JSON,同一属性多值 OR、属性间 AND", + "name": "attr_filters", + "in": "query" + }, + { + "type": "string", + "description": "属性逐值裁决 JSON(off 隐藏 / on 强制显示,on 优先)", + "name": "attr_rules", + "in": "query" + } + ], + "responses": { + "200": { + "description": "图片资产分页列表", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "请求参数错误", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "与 GET /images 同义,筛选参数改经 JSON body 传递:knowledge_ids 不再受 URL 长度限制(上限 1000),供来源文档全选使用。", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "knowledge" + ], + "summary": "列出知识库图片资产(body 版)", + "parameters": [ + { + "type": "string", + "description": "知识库 ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "筛选参数(与 GET /images 同名参数同义)", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/internal_handler.imageListRequestBody" + } + } + ], + "responses": { + "200": { + "description": "图片资产分页列表", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "请求参数错误", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } + } + }, "/knowledge-bases/{id}/knowledge": { "get": { "security": [ @@ -5148,6 +5389,18 @@ "description": "为 true 时同时返回子文件夹内的文档", "name": "folder_recursive", "in": "query" + }, + { + "type": "string", + "description": "排序字段: updated_at/created_at/file_name,默认 created_at", + "name": "sort_by", + "in": "query" + }, + { + "type": "string", + "description": "排序方向: asc/desc,默认 desc", + "name": "sort_order", + "in": "query" } ], "responses": { @@ -5740,6 +5993,50 @@ } } }, + "/knowledge-bases/{id}/profile/generate": { + "post": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "基于文档画像聚合,立即重新生成知识库的 AI 描述(不覆盖手写描述)", + "produces": [ + "application/json" + ], + "tags": [ + "知识库" + ], + "summary": "生成知识库描述", + "parameters": [ + { + "type": "string", + "description": "知识库ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "生成的知识库画像", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "知识库类型不支持或未配置模型", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } + } + }, "/knowledge-bases/{id}/shares": { "get": { "security": [ @@ -6270,7 +6567,7 @@ "ApiKeyAuth": [] } ], - "description": "在知识库中搜索(不使用LLM总结)", + "description": "在知识库中搜索(不使用LLM总结)。与产品内问答使用同一检索流程(召回、rerank、合并),外部检索首选;可覆盖召回参数与 rerank", "consumes": [ "application/json" ], @@ -7258,6 +7555,53 @@ } } }, + "/knowledge/{id}/spans": { + "get": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "返回该知识在解析流水线的 trace tree(root → stage → subspan):每段状态、耗时、input/output、错误码、langfuse_trace_id。支持 ?attempt=N 查看历史尝试;不传则返回最新尝试。前端用于渲染时间线 + 多模态/embedding 子节点 + 一键跳转 Langfuse。", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "知识管理" + ], + "summary": "获取知识文档解析的 Span 树(含历史尝试)", + "parameters": [ + { + "type": "string", + "description": "知识ID", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "指定尝试号;省略=最新", + "name": "attempt", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, "/knowledgebase/{kb_id}/wiki/auto-fix": { "post": { "security": [ @@ -8676,6 +9020,20 @@ "MCP服务" ], "summary": "获取MCP服务列表", + "parameters": [ + { + "type": "string", + "description": "Agent ID; needs agent_source_tenant_id", + "name": "agent_id", + "in": "query" + }, + { + "type": "integer", + "description": "Shared agent source workspace", + "name": "agent_source_tenant_id", + "in": "query" + } + ], "responses": { "200": { "description": "MCP服务列表", @@ -8689,6 +9047,12 @@ "schema": { "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" } + }, + "403": { + "description": "无权使用该共享智能体", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } } } }, @@ -10817,6 +11181,65 @@ } } }, + "/models/catalog/resolve": { + "get": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "根据厂商、模型名、Base URL 与 extra_config 返回目录解析结果(协议、思考等级、上下文等),供模型编辑器实时展示", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "模型管理" + ], + "summary": "解析模型的有效接入配置", + "parameters": [ + { + "type": "string", + "description": "厂商标识", + "name": "provider", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "模型名", + "name": "model", + "in": "query" + }, + { + "type": "string", + "description": "Base URL", + "name": "base_url", + "in": "query" + }, + { + "type": "string", + "description": "模型类型", + "name": "model_type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "解析结果", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, "/models/providers": { "get": { "security": [ @@ -10827,7 +11250,7 @@ "ApiKeyAuth": [] } ], - "description": "根据模型类型获取支持的厂商列表及配置信息", + "description": "根据模型类型获取支持的厂商定义(含图标、默认地址、额外字段、内置模型目录与思考能力)", "consumes": [ "application/json" ], @@ -10841,7 +11264,7 @@ "parameters": [ { "type": "string", - "description": "模型类型 (chat, embedding, rerank, vllm)", + "description": "模型类型 (chat, embedding, rerank, vllm, asr)", "name": "model_type", "in": "query" } @@ -11045,6 +11468,68 @@ } } }, + "/models/{id}/copy": { + "post": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "复制模型配置。name 与源模型一致,凭证从已存记录复制,不接受客户端重传。", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "模型管理" + ], + "summary": "复制模型", + "parameters": [ + { + "type": "string", + "description": "源模型ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "副本展示名", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/internal_handler.CopyModelRequest" + } + } + ], + "responses": { + "201": { + "description": "复制的模型", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "请求参数错误", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + }, + "404": { + "description": "模型不存在", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } + } + }, "/organizations": { "get": { "security": [ @@ -13793,6 +14278,67 @@ "responses": {} } }, + "/sessions/{session_id}/messages/{message_id}/artifacts/{index}": { + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除某条 assistant 消息生成的单个文件;all_versions=true 时连同本会话中该文件的所有历史版本一并删除", + "produces": [ + "application/json" + ], + "tags": [ + "会话" + ], + "summary": "删除会话中的产物文件", + "parameters": [ + { + "type": "string", + "description": "会话ID", + "name": "session_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "消息ID", + "name": "message_id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "产物在消息中的位置", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "是否删除该文件的所有版本", + "name": "all_versions", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } + } + }, "/sessions/{session_id}/messages/{message_id}/artifacts/{index}/download": { "get": { "responses": {} @@ -13947,6 +14493,80 @@ } } }, + "/sessions/{session_id}/rewind": { + "post": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "回滚当前会话到指定用户或助手消息:删除其后消息,可到达时 git reset 工作区。", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "会话" + ], + "summary": "回滚会话", + "parameters": [ + { + "type": "string", + "description": "会话 ID", + "name": "session_id", + "in": "path", + "required": true + }, + { + "description": "回滚请求", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/internal_handler_session.RewindSessionRequest" + } + } + ], + "responses": { + "200": { + "description": "回滚结果", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "请求参数错误 / 回滚点角色不支持", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + }, + "404": { + "description": "会话或消息不存在", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + }, + "409": { + "description": "会话正在生成中 / 无检查点 / 沙箱已更换", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + }, + "500": { + "description": "工作区回滚失败", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } + } + }, "/sessions/{session_id}/steer": { "post": { "security": [ @@ -14318,9 +14938,21 @@ "parameters": [ { "type": "string", - "description": "Sandbox config ID", + "description": "Sandbox config ID; ignored for a shared agent", "name": "sandbox_config_id", "in": "query" + }, + { + "type": "string", + "description": "Agent ID; needs agent_source_tenant_id", + "name": "agent_id", + "in": "query" + }, + { + "type": "integer", + "description": "Shared agent source workspace", + "name": "agent_source_tenant_id", + "in": "query" } ], "responses": { @@ -14330,6 +14962,12 @@ "type": "object", "additionalProperties": true } + }, + "403": { + "description": "无权使用该共享智能体", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } } } } @@ -15182,6 +15820,198 @@ } } }, + "/system/admin/model-catalog": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "System administrator JWT only; API keys are not accepted. Returns built-in, deployment and effective\ncatalogs, the current overlay, version/baseline tokens, and the latest 20 published revisions.", + "produces": [ + "application/json" + ], + "tags": [ + "系统管理" + ], + "summary": "Get the system model catalog", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogState" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "403": { + "description": "Forbidden", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "503": { + "description": "Service Unavailable", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "System administrator JWT only; API keys are not accepted. Validates and publishes a new overlay\nrevision using the current version and baseline. Stale values return 409. To restore a historical\nconfiguration, submit its overlay with the current version and baseline.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "系统管理" + ], + "summary": "Publish a model catalog overlay", + "parameters": [ + { + "description": "Version, baseline and overlay object (max 1 MiB)", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogState" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "403": { + "description": "Forbidden", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "409": { + "description": "Conflict", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, + "/system/admin/model-catalog/preview": { + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "System administrator JWT only; API keys are not accepted. Validates the overlay without publishing\nit. Supply the current version and baseline; stale values return 409. The response contains the\ncandidate effective catalog and normalized overlay; history, builtin and deployment are null.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "系统管理" + ], + "summary": "Preview a model catalog overlay", + "parameters": [ + { + "description": "Version, baseline and overlay object (max 1 MiB)", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogState" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "403": { + "description": "Forbidden", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "409": { + "description": "Conflict", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, "/system/admin/promote": { "post": { "description": "Grant system administrator privileges to a user (SystemAdmin only).\nIdempotent: re-promoting an existing system admin returns 200 with no DB write.\nIdentify the user by email (preferred for human operators) or user_id (UUID, for API clients).", @@ -15610,6 +16440,49 @@ } } }, + "/system/admin/users": { + "get": { + "description": "Retrieve a paginated list of every user across tenants (SystemAdmin only).\nSupports `offset` (default 0) and `limit` (default 50, max 200).\nPassword/hashes are never serialised — only the redacted UserInfo shape.", + "produces": [ + "application/json" + ], + "tags": [ + "System Admin" + ], + "summary": "List all platform users", + "parameters": [ + { + "type": "integer", + "default": 0, + "description": "Page offset", + "name": "offset", + "in": "query" + }, + { + "type": "integer", + "default": 50, + "description": "Page size (max 200)", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Users retrieved successfully", + "schema": { + "$ref": "#/definitions/internal_handler.ListAllUsersResponse" + } + }, + "403": { + "description": "Forbidden: not a system admin", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, "/system/admin/users/create": { "post": { "description": "Provision a new local user account (SystemAdmin only).\nWhen `password` is omitted or null, a cryptographically random\npassword is generated (OIDC-style crypto/rand + base64url)\nand returned once in the response body. Any provided value,\nincluding empty string, is policy-checked. Tenant provisioning\nfollows the shared auth.default_tenant_mode policy.", @@ -15734,6 +16607,55 @@ } } }, + "/system/admin/users/status": { + "post": { + "description": "Disable revokes the target's active sessions immediately.\nSelf-disable and disabling the last active system administrator are rejected.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "System Admin" + ], + "summary": "Enable or disable a user account", + "parameters": [ + { + "description": "Account status request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/internal_handler.SetUserStatusRequest" + } + } + ], + "responses": { + "200": { + "description": "Status updated", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "Self-disable / last-admin guard", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "404": { + "description": "User not found", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, "/system/capabilities": { "get": { "description": "返回当前部署版本及实际注册的后端路由所对应的功能能力;仅 supported=false 表示入口应隐藏", @@ -18039,9 +18961,183 @@ } } } + }, + "/wiki-search": { + "post": { + "security": [ + { + "Bearer": [] + }, + { + "ApiKeyAuth": [] + } + ], + "description": "Cross-KB wiki search using the same POSIX regex ranking as single-KB wiki search", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Wiki" + ], + "summary": "Cross-KB wiki search", + "parameters": [ + { + "description": "Wiki search request", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/internal_handler.SearchWikiRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError" + } + } + } + } } }, "definitions": { + "github_com_Tencent_WeKnora_internal_application_service.CatalogProviderView": { + "type": "object", + "properties": { + "api": { + "type": "string" + }, + "id": { + "type": "string" + }, + "model_thinking_levels": { + "description": "ModelThinkingLevels lists, per chat model id, the levels offered once\nthinking is enabled, resolved against the vendor map and protocol so\nthe console does not re-implement level inheritance.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_models_api.ReasoningEffort" + } + } + }, + "model_types": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelType" + } + }, + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_models.ModelSpec" + } + }, + "name": { + "type": "string" + }, + "settings": { + "type": "object", + "additionalProperties": {} + }, + "vendor_thinking_levels": { + "description": "VendorThinkingLevels is what a chat model without its own map offers.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_models_api.ReasoningEffort" + } + } + } + }, + "github_com_Tencent_WeKnora_internal_application_service.CatalogRevision": { + "type": "object", + "properties": { + "overlay": { + "type": "object" + }, + "updated_at": { + "type": "string" + }, + "updated_by": { + "type": "string" + }, + "version": { + "type": "integer" + } + } + }, + "github_com_Tencent_WeKnora_internal_application_service.CatalogState": { + "type": "object", + "properties": { + "applied_version": { + "type": "integer" + }, + "baseline": { + "type": "string" + }, + "builtin": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogProviderView" + } + }, + "deployment": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogProviderView" + } + }, + "deployment_error": { + "type": "string" + }, + "effective": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogProviderView" + } + }, + "history": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogRevision" + } + }, + "overlay": { + "type": "object" + }, + "sync_error": { + "type": "string" + }, + "version": { + "type": "integer" + } + } + }, + "github_com_Tencent_WeKnora_internal_application_service.CatalogUpdate": { + "type": "object", + "properties": { + "baseline": { + "type": "string" + }, + "overlay": { + "type": "object" + }, + "version": { + "type": "integer" + } + } + }, "github_com_Tencent_WeKnora_internal_application_service.WikiLintIssue": { "type": "object", "properties": { @@ -18317,6 +19413,152 @@ } } }, + "github_com_Tencent_WeKnora_internal_models.ModelCost": { + "type": "object", + "properties": { + "cache_read": { + "type": "number" + }, + "cache_write": { + "type": "number" + }, + "currency": { + "type": "string" + }, + "input": { + "type": "number" + }, + "output": { + "type": "number" + } + } + }, + "github_com_Tencent_WeKnora_internal_models.ModelSpec": { + "type": "object", + "properties": { + "aliases": { + "description": "Aliases are additional ids that resolve to this entry (dated\nsnapshots, vendor-prefixed names on gateways).", + "type": "array", + "items": { + "type": "string" + } + }, + "api": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_models_api.API" + }, + "compat": { + "description": "Compat is the protocol-specific overlay for this model (flat object,\nfields depend on API). Decoded lazily by Resolve.", + "type": "array", + "items": { + "type": "integer" + } + }, + "context_window": { + "type": "integer" + }, + "cost": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_models.ModelCost" + }, + "deprecated": { + "description": "Deprecated hides the entry from pickers but keeps resolution working.", + "type": "boolean" + }, + "dimension": { + "description": "Dimension is the embedding vector width (embedding entries only).", + "type": "integer" + }, + "id": { + "type": "string" + }, + "input": { + "description": "Input lists accepted modalities: text, image, audio, video.", + "type": "array", + "items": { + "type": "string" + } + }, + "match": { + "description": "Match is a case-insensitive glob (\"gpt-5*\", \"*deepseek-r1*\") that lets\none entry describe a family. Exact ids and aliases win over patterns;\namong patterns the longest literal prefix wins.", + "type": "string" + }, + "max_output_tokens": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "reasoning": { + "description": "Reasoning reports whether the model can emit thinking at all.", + "type": "boolean" + }, + "source": { + "description": "Source is the documentation URL the facts were taken from.", + "type": "string" + }, + "thinking_levels": { + "description": "ThinkingLevels maps protocol-neutral levels to vendor values; missing\nkeys inherit the vendor map. See api.ThinkingLevelMap.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_models_api.ThinkingLevelMap" + } + ] + }, + "type": { + "description": "Type is the WeKnora model type this entry describes. Chat models with\nimage input are still KnowledgeQA; the UI derives VLM eligibility from\nInput. Embedding / Rerank / ASR entries exist for the model picker.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelType" + } + ] + } + } + }, + "github_com_Tencent_WeKnora_internal_models_api.API": { + "type": "string", + "enum": [ + "openai-completions", + "openai-responses", + "anthropic-messages", + "google-generative-ai", + "ollama" + ], + "x-enum-varnames": [ + "APIOpenAICompletions", + "APIOpenAIResponses", + "APIAnthropicMessages", + "APIGoogleGenerativeAI", + "APIOllama" + ] + }, + "github_com_Tencent_WeKnora_internal_models_api.ReasoningEffort": { + "type": "string", + "enum": [ + "off", + "auto", + "minimal", + "low", + "medium", + "high", + "xhigh", + "max" + ], + "x-enum-varnames": [ + "ReasoningOff", + "ReasoningAuto", + "ReasoningMinimal", + "ReasoningLow", + "ReasoningMedium", + "ReasoningHigh", + "ReasoningXHigh", + "ReasoningMax" + ] + }, + "github_com_Tencent_WeKnora_internal_models_api.ThinkingLevelMap": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "github_com_Tencent_WeKnora_internal_models_limiter.RuntimeStat": { "type": "object", "properties": { @@ -18400,6 +19642,13 @@ "description": "ReasoningContent stores the OpenAI-protocol reasoning_content emitted by the\nmodel in this round. Persisted on AgentStep so cross-turn replay can put it\nback on the assistant message — required by MiMo / DeepSeek V3.2+ thinking\nmode, ignored by providers that don't recognize the field.", "type": "string" }, + "reasoning_metadata": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ProviderMetadata" + }, + "reasoning_signature": { + "description": "ReasoningSignature / ReasoningMetadata are the provider artifacts that\nmust accompany ReasoningContent on replay (Anthropic signatures,\nOpenAI Responses encrypted reasoning items).", + "type": "string" + }, "thought": { "description": "LLM's reasoning/thinking (Think phase)", "type": "string" @@ -18415,6 +19664,10 @@ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ToolCall" } }, + "truncated": { + "description": "Truncated marks the round the completion-token cap cut off. It rides in\nthe agent_steps JSON so a reloaded, shared or re-opened conversation can\nstill show that the answer stops mid-sentence by design, rather than\nlooking finished. Live streaming carries the same fact on the answer\nevent; this is what survives the round trip.", + "type": "boolean" + }, "user_messages_before": { "description": "UserMessagesBefore records consumed steer rows in delivery order, before\nthis model response. Unlike timestamps, this remains unambiguous on replay.", "type": "array", @@ -19163,6 +20416,10 @@ } ] }, + "reasoning_effort": { + "description": "ReasoningEffort selects the thinking intensity (off | auto | minimal |\nlow | medium | high | xhigh | max). Empty keeps the boolean Thinking\nsemantics: true means \"auto\". See internal/models/api.ReasoningEffort.", + "type": "string" + }, "rerank_model_id": { "description": "ReRank model ID for retrieval", "type": "string" @@ -19729,6 +20986,22 @@ } } }, + "github_com_Tencent_WeKnora_internal_types.GalleryUserPrefs": { + "type": "object", + "properties": { + "mode": { + "description": "Mode is \"all\" (every search-eligible field active) or \"custom\"\n(per-field Status governs). Empty = \"all\".", + "type": "string" + }, + "status": { + "description": "Status maps a namespaced attribute id (\"builtin:caption\") to\n\"on\"/\"off\". Only consulted in custom mode; an unrecorded field is\noff. Source-declared on/off does not exist — activation is always\nthe user's own record.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, "github_com_Tencent_WeKnora_internal_types.GraphNode": { "type": "object", "properties": { @@ -19763,9 +21036,60 @@ } } }, + "github_com_Tencent_WeKnora_internal_types.ImageActionsConfig": { + "type": "object", + "properties": { + "ocr": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageOCRAction" + } + } + }, + "github_com_Tencent_WeKnora_internal_types.ImageAttrCondition": { + "type": "object", + "properties": { + "is": { + "type": "string" + }, + "prop": { + "type": "string" + } + } + }, + "github_com_Tencent_WeKnora_internal_types.ImageOCRAction": { + "type": "object", + "properties": { + "on": { + "description": "On is the list of attribute conditions that enable OCR. Matching any one\nturns OCR on.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageAttrCondition" + } + }, + "on_unobserved": { + "description": "OnUnobserved is the OCR decision used when the observation does not\nanswer for one of the attributes the policy reads — the attribute is\nabsent because the model skipped the line, or because the value it wrote\nwas not one of the allowed ones. The default is true: an incomplete\nobservation keeps extracting, so a missed block of text costs one extra\ncall instead of being lost. Turn it off only with a model reliable enough\nto answer every attribute line.", + "type": "boolean" + } + } + }, "github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig": { "type": "object", "properties": { + "image_actions": { + "description": "ImageActions overrides the built-in attribute→work table (see\nDefaultImageActions). A nil value keeps the conservative default: run OCR\nfor block text, data visuals, and unobserved images.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageActionsConfig" + } + ] + }, + "image_attrs_enabled": { + "description": "ImageAttrsEnabled turns the attribute-observed image pipeline on for this\nknowledge base. It is off by default on purpose, so upgrading an\nexisting deployment never changes what happens to documents already\nbeing ingested: with it off every image is described and OCR'd exactly\nas before. When on, the describe round also observes image attributes and\nthe attribute policy decides whether OCR runs for it. A single upload can\noverride it per document through\nKnowledgeProcessOverrides.ImageAttrsEnabled.", + "type": "boolean" + }, + "image_vector_enabled": { + "description": "ImageVectorEnabled lets a knowledge base whose embedding model takes\nimages index each image by its own vector and recall it with one. It\nis off by default on purpose: a model that takes images is also used\nfor plain text, and turning this on costs an embedding call per image\nand widens vector recall. Existing knowledge bases stay off after an\nupgrade because the stored JSON has no such key.", + "type": "boolean" + }, "model_id": { "description": "Model ID", "type": "string" @@ -19869,7 +21193,7 @@ ], "properties": { "representative_user_id": { - "description": "RepresentativeUserID identifies the user attached to the OTM row for\ndisplay/audit. Optional: when unset, the handler picks a stable default\n(the user from the legacy UserID field, or the workspace's owner).", + "description": "RepresentativeUserID is accepted for compatibility and ignored: a\ndirect add attaches no user of the enrolled workspace, since the\ninviter must not choose whose details the roster shows.", "type": "string" }, "role": { @@ -19885,7 +21209,7 @@ "type": "integer" }, "user_id": { - "description": "UserID is retained for backward compatibility. When set without\nTenantID, the handler resolves the user's TenantID and uses this\nuser as the representative.", + "description": "UserID is retained for backward compatibility. When set without\nTenantID, the handler resolves the user's TenantID.", "type": "string" } } @@ -20040,6 +21364,14 @@ } ] }, + "generated_profile": { + "description": "GeneratedProfile is the machine-generated description: a gist, merged\ntopics, typical questions and the aggregate snapshot they came from. It\nnever overwrites the user-authored Description; both are shown to agents.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfile" + } + ] + }, "id": { "description": "Unique identifier of the knowledge base", "type": "string" @@ -20088,6 +21420,14 @@ "description": "ProcessingCount indicates the number of knowledge items being processed (for document type knowledge bases)", "type": "integer" }, + "profile_config": { + "description": "ProfileConfig controls automatic generation of the knowledge-base\ndescription from per-document profiles (document knowledge bases only).", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileConfig" + } + ] + }, "question_generation_config": { "description": "QuestionGenerationConfig stores question generation configuration for document knowledge bases", "allOf": [ @@ -20186,7 +21526,7 @@ ] }, "image_processing_config": { - "description": "Image processing configuration", + "description": "Image processing configuration.\n\nnil means \"no change\" when updating, the same contract IndexingStrategy\nuses. A request that does not mention this field must leave the image\nsettings alone: the attribute-observation switch and the attribute policy\nare things a knowledge base accumulates, and a client that predates them\nwould otherwise reset the lot on any save. Sending an object — empty\nincluded — replaces the whole configuration.", "allOf": [ { "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig" @@ -20201,6 +21541,14 @@ } ] }, + "profile_config": { + "description": "ProfileConfig controls optional automatic knowledge-base description\ngeneration. nil means \"no change\" when updating.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileConfig" + } + ] + }, "wiki_config": { "description": "Wiki configuration (only for wiki-enabled knowledge bases)", "allOf": [ @@ -20211,6 +21559,128 @@ } } }, + "github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfile": { + "type": "object", + "properties": { + "aggregate_hash": { + "description": "AggregateHash identifies the aggregate the gist was generated from. A\nmismatch with the live aggregate means the text is stale.", + "type": "string" + }, + "error": { + "description": "Error holds the last generation error when Status is failed.", + "type": "string" + }, + "generated_at": { + "description": "GeneratedAt records when the text was produced.", + "type": "string" + }, + "gist": { + "description": "Gist is a short statement of what the knowledge base covers.", + "type": "string" + }, + "model_id": { + "description": "ModelID records which chat model produced the text.", + "type": "string" + }, + "stats": { + "description": "Stats is the aggregate snapshot the text was generated from.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileStats" + } + ] + }, + "status": { + "description": "Status is one of the KnowledgeBaseProfileStatus* values.", + "type": "string" + }, + "topics": { + "description": "Topics is the merged topic list (at most KnowledgeBaseProfileMaxTopics).", + "type": "array", + "items": { + "type": "string" + } + }, + "typical_questions": { + "description": "TypicalQuestions lists questions this knowledge base can answer.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileConfig": { + "type": "object", + "properties": { + "custom_instructions": { + "description": "CustomInstructions is appended to the stable system prompt, e.g. the\naudience the description should address or terms to keep.", + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "model_id": { + "description": "ModelID overrides the chat model; empty falls back to the KB summary model.", + "type": "string" + } + } + }, + "github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileStats": { + "type": "object", + "properties": { + "doc_types": { + "description": "DocTypes counts documents per model-assigned document type.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.NamedCount" + } + }, + "document_count": { + "description": "DocumentCount is the number of eligible documents at generation time.", + "type": "integer" + }, + "earliest_at": { + "description": "EarliestAt and LatestAt bound document creation times.", + "type": "string" + }, + "file_types": { + "description": "FileTypes counts documents per file extension.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.NamedCount" + } + }, + "folders": { + "description": "Folders lists the top-level folder names present.", + "type": "array", + "items": { + "type": "string" + } + }, + "latest_at": { + "type": "string" + }, + "profiled_count": { + "description": "ProfiledCount is how many of them carried a document profile.", + "type": "integer" + }, + "raw_topics": { + "description": "RawTopics counts documents per normalized topic keyword before merging.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.NamedCount" + } + }, + "tags": { + "description": "Tags counts documents per knowledge-base tag.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.NamedCount" + } + } + } + }, "github_com_Tencent_WeKnora_internal_types.KnowledgeBaseShareResponse": { "type": "object", "properties": { @@ -20334,6 +21804,22 @@ "graph_enabled": { "type": "boolean" }, + "image_actions": { + "description": "ImageActions overrides rows of the attribute-\u003ework table for this document\n(merged per action key on top of the knowledge base's table).\nnil keeps the knowledge base's setting.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageActionsConfig" + } + ] + }, + "image_attrs_enabled": { + "description": "ImageAttrsEnabled overrides the knowledge base's attribute-observed image\npipeline switch for this one document. nil keeps the knowledge base's\nsetting.", + "type": "boolean" + }, + "image_vector_enabled": { + "description": "ImageVectorEnabled overrides image vector indexing for this document.\nIt does not change the KB-wide retrieval setting or embedding model.", + "type": "boolean" + }, "parser_engine_overrides": { "description": "ParserEngineOverrides passes key-value configuration to docreader parsers\n(e.g. pdf_force_scanned=true). Merged with workspace-level overrides in the\nparse pipeline; per-upload values take priority on conflict.", "type": "object", @@ -20740,6 +22226,20 @@ "MatchTypeDataAnalysis" ] }, + "github_com_Tencent_WeKnora_internal_types.MatchedImage": { + "type": "object", + "properties": { + "chunk_id": { + "type": "string" + }, + "knowledge_base_id": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, "github_com_Tencent_WeKnora_internal_types.Membership": { "type": "object", "properties": { @@ -20857,7 +22357,7 @@ } }, "artifacts": { - "description": "Skill-generated files produced during this assistant turn (assistant messages only).\nPopulated by ArtifactCollector after the sandbox finishes, referenced by the\nartifact download endpoint. Empty for user messages and turns without skills.", + "description": "Skill-generated files produced during this assistant turn (assistant messages only).\nPopulated by ArtifactCollector after the sandbox finishes, referenced by the\nartifact download endpoint. Empty for user messages and turns without skills.\n\nStored in the message_artifacts table, not on the message row: the message\nrepository loads it with every message it returns and writes it whenever it\nis non-nil on create or update. A nil slice leaves the stored rows alone.", "type": "array", "items": { "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MessageArtifact" @@ -20983,6 +22483,10 @@ "description": "When WeKnora persisted the blob", "type": "string" }, + "deleted_at": { + "description": "DeletedAt marks a file the user deleted. The entry stays in the list\nrather than being removed because its position IS the download address\n(msg.Artifacts[index]); dropping it would shift every later file's index\nand hand an old link the wrong blob. Keeping it also keeps the entry in\nArtifactCollector's de-duplication set, so the next collect does not\nre-attach the very file that was deleted — its sandbox mtime has not\nmoved. Clients filter these out; the bytes are already reclaimed.", + "type": "string" + }, "file_name": { "description": "Original filename inside the sandbox", "type": "string" @@ -21152,6 +22656,14 @@ "description": "Provider identifier: openai, aliyun, zhipu, generic", "type": "string" }, + "spec": { + "description": "Spec overrides the catalog entry for this row: protocol, capability\nflags and the flat protocol compat object. Everything omitted is\ninherited from the vendor catalog (see internal/models/catalog).", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSpecOverride" + } + ] + }, "supports_vision": { "description": "Whether the model accepts image/multimodal input", "type": "boolean" @@ -21245,6 +22757,40 @@ "ModelSourceAzureOpenAI" ] }, + "github_com_Tencent_WeKnora_internal_types.ModelSpecOverride": { + "type": "object", + "properties": { + "api": { + "type": "string" + }, + "compat": { + "description": "Compat is a plain object so it round-trips through both JSON (API,\ndatabase column) and YAML (builtin_models.yaml).", + "type": "object", + "additionalProperties": {} + }, + "context_window": { + "type": "integer" + }, + "input": { + "type": "array", + "items": { + "type": "string" + } + }, + "max_output_tokens": { + "type": "integer" + }, + "reasoning": { + "type": "boolean" + }, + "thinking_levels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, "github_com_Tencent_WeKnora_internal_types.ModelType": { "type": "string", "enum": [ @@ -21276,6 +22822,17 @@ "ModelTypeASR" ] }, + "github_com_Tencent_WeKnora_internal_types.NamedCount": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "name": { + "type": "string" + } + } + }, "github_com_Tencent_WeKnora_internal_types.OBSEngineConfig": { "type": "object", "properties": { @@ -21535,12 +23092,20 @@ "type": "string" }, "mineru_model": { - "description": "MinerU 自建解析参数", + "description": "以下 backend、vLLM、公式/表格、语言参数仅对 3.x 及更早版本生效。", "type": "string" }, "mineru_parse_method": { "type": "string" }, + "mineru_server_api_key": { + "description": "MinerU 自建解析参数。协议按服务端自动识别:4.0+ 走 V1 API,更早版本走 /file_parse。", + "type": "string" + }, + "mineru_tier": { + "description": "4.0+:flash/basic/standard/advanced,空为服务端默认", + "type": "string" + }, "mineru_vlm_server_url": { "description": "vLLM 服务器地址 (vlm-http-client / hybrid-http-client)", "type": "string" @@ -21622,6 +23187,15 @@ "PromptCacheStatusHit" ] }, + "github_com_Tencent_WeKnora_internal_types.ProviderMetadata": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "integer" + } + } + }, "github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig": { "type": "object", "properties": { @@ -21777,6 +23351,27 @@ } } }, + "github_com_Tencent_WeKnora_internal_types.RerankOptions": { + "type": "object", + "properties": { + "enabled": { + "description": "Enabled turns the rerank stage off when explicitly false. Nil means on.", + "type": "boolean" + }, + "model_id": { + "description": "ModelID selects the rerank model. Empty falls back to the tenant\nRetrievalConfig, then to the first rerank model of the tenant.", + "type": "string" + }, + "threshold": { + "description": "Threshold is the minimum rerank model score. Nil uses the tenant\nRetrievalConfig. A pointer because 0 and negative scores are valid.", + "type": "number" + }, + "top_k": { + "description": "TopK caps the reranked results. Zero uses the endpoint's result count.", + "type": "integer" + } + } + }, "github_com_Tencent_WeKnora_internal_types.Resource": { "type": "object", "properties": { @@ -22237,6 +23832,14 @@ "description": "QueryText is required unless query_embedding is provided, keyword matching is disabled,\nand vector matching remains enabled.", "type": "string" }, + "rerank": { + "description": "Rerank, when present and enabled, reranks the fused candidates before\ntruncating to MatchCount. Only the hybrid-search API reads it; internal\ncallers rerank on their own.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RerankOptions" + } + ] + }, "scope_tag_ids": { "type": "array", "items": { @@ -22337,6 +23940,13 @@ "description": "MatchedContent is the actual content that was matched in vector search\nFor FAQ: this is the matched question text (standard or similar question)", "type": "string" }, + "matched_images": { + "description": "MatchedImages survives merging, deduplication and stored reference replay.\nIt contains storage references, never image bytes.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MatchedImage" + } + }, "metadata": { "description": "Metadata", "type": "object", @@ -22356,6 +23966,13 @@ "description": "Seq", "type": "integer" }, + "source_locators": { + "description": "SourceLocators point back into the original file for citation\nnavigation. Merged results carry the union of their chunks' locators.", + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SourceLocator" + } + }, "start_at": { "description": "Start at", "type": "integer" @@ -22386,6 +24003,10 @@ "description": "ForkedFromMessageID is the user or assistant message, IN THE PARENT\nSESSION, that the fork branched at. For a user point, messages strictly\nbefore it were copied here. For an assistant point, that answer is\nincluded so the branch continues after it.", "type": "string" }, + "host_workspace_dir": { + "description": "HostWorkspaceDir is the user-selected project directory this session\noperates in, for the WeKnora Lite host sandbox only. Empty means the session\ngets an auto-allocated workspace instead.\n\nWritten once at creation and never updated: re-pointing a live session\nat a different directory would leave its transcript describing files\nthat are no longer there. Standard edition never writes it.", + "type": "string" + }, "id": { "description": "ID", "type": "string" @@ -22474,6 +24095,9 @@ "model_id": { "type": "string" }, + "reasoning_effort": { + "type": "string" + }, "skill_names": { "type": "array", "items": { @@ -22531,6 +24155,85 @@ } } }, + "github_com_Tencent_WeKnora_internal_types.SourceLocator": { + "type": "object", + "properties": { + "bbox": { + "description": "BBox is [x0, y0, x1, y1] as fractions of the page width and height,\norigin at the top-left corner of the rendered page.", + "type": "array", + "items": { + "type": "number" + } + }, + "block": { + "description": "Block is the 1-based index among a Word file's body paragraphs and tables.", + "type": "integer" + }, + "end": { + "type": "integer" + }, + "end_ms": { + "type": "integer" + }, + "mapping": { + "description": "Mapping records verified text-to-source alignment. Empty means legacy.", + "type": "string" + }, + "page": { + "description": "Page is the 1-based PDF page.", + "type": "integer" + }, + "partial": { + "description": "Partial means some of the chunk has no source mapping.", + "type": "boolean" + }, + "quote": { + "description": "Quote is the complete cited overlap as parsed. Viewers match it\ninside the rendered original and against the\nanswer sentence that cites the chunk.", + "type": "string" + }, + "row_end": { + "type": "integer" + }, + "row_start": { + "type": "integer" + }, + "section": { + "description": "Section is the 1-based EPUB spine index.", + "type": "integer" + }, + "sheet": { + "description": "Sheet is the spreadsheet sheet name; RowStart/RowEnd are its 1-based\nrow numbers as shown by spreadsheet applications.", + "type": "string" + }, + "slide": { + "description": "Slide is the 1-based slide number in presentation order.", + "type": "integer" + }, + "source_hash": { + "description": "SourceHash binds the locator to the knowledge record’s source revision hash.", + "type": "string" + }, + "source_id": { + "description": "SourceID identifies a block within the parser result, not a rendered item.", + "type": "string" + }, + "start": { + "description": "Start/End are rune offsets into the original text file.", + "type": "integer" + }, + "start_ms": { + "description": "StartMs/EndMs bound an audio segment.", + "type": "integer" + }, + "title": { + "description": "Title names the section or slide when the source has one.", + "type": "string" + }, + "type": { + "type": "string" + } + } + }, "github_com_Tencent_WeKnora_internal_types.StarterSuggestionConfig": { "type": "object", "properties": { @@ -23411,6 +25114,14 @@ "description": "BrowserSearchInstructions customizes browser search for this user. Nil/empty uses the platform default.", "type": "string" }, + "gallery": { + "description": "Gallery holds the user's image-gallery UI state: the search\nactivation mode and the per-attribute search-field toggles. Written\nby the gallery's mode / checkbox interactions via the preferences\nPUT; read back by GET /knowledge-bases/:id/gallery-config so the\ngallery renders the same activation state on every device. Nil = the\nuser never touched the gallery controls (mode defaults to \"all\").", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.GalleryUserPrefs" + } + ] + }, "last_active_tenant_id": { "description": "LastActiveTenantID remembers the last workspace the user actively\nswitched into, so a fresh login (new device, cleared browser, new\nrefresh token) lands them back in that workspace instead of always\nbouncing to their home workspace. Written by the SPA's preferences\nPUT and by service-level SwitchTenant (including when switching\nhome, which stores the home ID). Login / RefreshToken validate that\nthe workspace still exists and the user still has an active membership\n(or CanAccessAllTenants) before honouring this preference; an\ninvalid pointer is best-effort cleared and the user falls back to\nhome. Refresh JWT claims have no tenant_id, so RefreshToken\nre-resolves from this field.\n\nnil = no preference (use user.TenantID, i.e. home)\n*0 = \"clear preference\" sentinel for the partial-update endpoint\n (UpdateUserPreferences turns this into nil). Otherwise treat\n a stored *0 the same as nil.\n*N = preferred workspace id.", "type": "integer" @@ -24595,6 +26306,17 @@ } } }, + "internal_handler.CopyModelRequest": { + "type": "object", + "required": [ + "display_name" + ], + "properties": { + "display_name": { + "type": "string" + } + } + }, "internal_handler.CreateAgentRequest": { "type": "object", "required": [ @@ -25160,6 +26882,26 @@ } } }, + "internal_handler.ListAllUsersResponse": { + "type": "object", + "properties": { + "has_more": { + "type": "boolean" + }, + "limit": { + "type": "integer" + }, + "offset": { + "type": "integer" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UserInfo" + } + } + } + }, "internal_handler.ListSystemAdminsResponse": { "type": "object", "properties": { @@ -25222,6 +26964,9 @@ "description": "为空时按需默认为 \"remote\"", "type": "string" }, + "spec": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSpecOverride" + }, "supportsDimensionOverride": { "type": "boolean" } @@ -25490,6 +27235,9 @@ "description": "为空时按需默认为 \"remote\"", "type": "string" }, + "spec": { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSpecOverride" + }, "supportsDimensionOverride": { "type": "boolean" } @@ -25722,6 +27470,44 @@ } } }, + "internal_handler.SearchWikiRequest": { + "type": "object", + "required": [ + "query" + ], + "properties": { + "knowledge_base_id": { + "type": "string" + }, + "knowledge_base_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "limit": { + "type": "integer" + }, + "query": { + "type": "string" + } + } + }, + "internal_handler.SetUserStatusRequest": { + "type": "object", + "required": [ + "is_active", + "user_id" + ], + "properties": { + "is_active": { + "type": "boolean" + }, + "user_id": { + "type": "string" + } + } + }, "internal_handler.StorageCheckRequest": { "type": "object", "properties": { @@ -25901,6 +27687,14 @@ }, "name": { "type": "string" + }, + "vlm_config": { + "description": "VLMConfig updates the knowledge base's multimodal (vision) config.\nOptional: nil means \"no change\", mirroring how CreateKnowledgeBase\naccepts a top-level vlm_config.", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.VLMConfig" + } + ] } } }, @@ -26139,6 +27933,64 @@ } } }, + "internal_handler.imageListRequestBody": { + "type": "object", + "properties": { + "attr_filters": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "attr_rules": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "is_enabled": { + "type": "boolean" + }, + "keyword": { + "type": "string" + }, + "knowledge_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "page": { + "description": "Page", + "type": "integer", + "minimum": 1 + }, + "page_size": { + "description": "Page size", + "type": "integer", + "maximum": 1000, + "minimum": 1 + }, + "search_in": { + "type": "array", + "items": { + "type": "string" + } + }, + "sort_by": { + "type": "string" + }, + "sort_order": { + "type": "string" + } + } + }, "internal_handler.invitationLookupRequest": { "type": "object", "required": [ @@ -26444,6 +28296,10 @@ } ] }, + "reasoning_effort": { + "description": "ReasoningEffort overrides thinking for this request; empty inherits the agent configuration.", + "type": "string" + }, "skill_names": { "description": "Per-request Skills selected via @mention", "type": "array", @@ -26478,6 +28334,10 @@ "description": "Description for the session (optional)", "type": "string" }, + "project_dir": { + "description": "ProjectDir is an optional Lite host-sandbox binding. When set it must\nbe an absolute path already present in the user-approved ProjectDirs\nlist. Empty means the session gets an auto-allocated workspace.", + "type": "string" + }, "title": { "description": "Title for the session (optional)", "type": "string" @@ -26567,12 +28427,36 @@ } } }, + "internal_handler_session.RewindSessionRequest": { + "type": "object", + "required": [ + "message_id" + ], + "properties": { + "message_id": { + "description": "MessageID is the message to rewind to. A user message deletes itself and\neverything after (the client prefills that question). An assistant\nmessage keeps itself and deletes everything after.", + "type": "string" + } + } + }, "internal_handler_session.SearchKnowledgeRequest": { "type": "object", "required": [ "query" ], "properties": { + "disable_keywords_match": { + "description": "Vector recall only", + "type": "boolean" + }, + "disable_vector_match": { + "description": "Keyword recall only", + "type": "boolean" + }, + "keyword_threshold": { + "description": "Minimum keyword score", + "type": "number" + }, "knowledge_base_id": { "description": "Single knowledge base ID (for backward compatibility)", "type": "string" @@ -26591,6 +28475,10 @@ "type": "string" } }, + "match_count": { + "description": "Number of results to return", + "type": "integer" + }, "mentioned_items": { "description": "Optional scoped tag mentions", "type": "array", @@ -26602,12 +28490,24 @@ "description": "Query text to search for", "type": "string" }, + "rerank": { + "description": "Rerank override", + "allOf": [ + { + "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RerankOptions" + } + ] + }, "tag_ids": { "description": "Tag IDs for filtering within a single KB", "type": "array", "items": { "type": "string" } + }, + "vector_threshold": { + "description": "Optional overrides of the tenant retrieval config. Omitted fields keep it.", + "type": "number" } } }, @@ -26682,4 +28582,4 @@ "in": "header" } } -} +} \ No newline at end of file diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 8b9136b0..23f40490 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,5 +1,92 @@ basePath: /api/v1 definitions: + github_com_Tencent_WeKnora_internal_application_service.CatalogProviderView: + properties: + api: + type: string + id: + type: string + model_thinking_levels: + additionalProperties: + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_models_api.ReasoningEffort' + type: array + description: |- + ModelThinkingLevels lists, per chat model id, the levels offered once + thinking is enabled, resolved against the vendor map and protocol so + the console does not re-implement level inheritance. + type: object + model_types: + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ModelType' + type: array + models: + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_models.ModelSpec' + type: array + name: + type: string + settings: + additionalProperties: {} + type: object + vendor_thinking_levels: + description: VendorThinkingLevels is what a chat model without its own map + offers. + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_models_api.ReasoningEffort' + type: array + type: object + github_com_Tencent_WeKnora_internal_application_service.CatalogRevision: + properties: + overlay: + type: object + updated_at: + type: string + updated_by: + type: string + version: + type: integer + type: object + github_com_Tencent_WeKnora_internal_application_service.CatalogState: + properties: + applied_version: + type: integer + baseline: + type: string + builtin: + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogProviderView' + type: array + deployment: + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogProviderView' + type: array + deployment_error: + type: string + effective: + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogProviderView' + type: array + history: + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogRevision' + type: array + overlay: + type: object + sync_error: + type: string + version: + type: integer + type: object + github_com_Tencent_WeKnora_internal_application_service.CatalogUpdate: + properties: + baseline: + type: string + overlay: + type: object + version: + type: integer + type: object github_com_Tencent_WeKnora_internal_application_service.WikiLintIssue: properties: auto_fixable: @@ -209,6 +296,123 @@ definitions: tier: $ref: '#/definitions/github_com_Tencent_WeKnora_internal_infrastructure_chunker.StrategyTier' type: object + github_com_Tencent_WeKnora_internal_models.ModelCost: + properties: + cache_read: + type: number + cache_write: + type: number + currency: + type: string + input: + type: number + output: + type: number + type: object + github_com_Tencent_WeKnora_internal_models.ModelSpec: + properties: + aliases: + description: |- + Aliases are additional ids that resolve to this entry (dated + snapshots, vendor-prefixed names on gateways). + items: + type: string + type: array + api: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_models_api.API' + compat: + description: |- + Compat is the protocol-specific overlay for this model (flat object, + fields depend on API). Decoded lazily by Resolve. + items: + type: integer + type: array + context_window: + type: integer + cost: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_models.ModelCost' + deprecated: + description: Deprecated hides the entry from pickers but keeps resolution + working. + type: boolean + dimension: + description: Dimension is the embedding vector width (embedding entries only). + type: integer + id: + type: string + input: + description: 'Input lists accepted modalities: text, image, audio, video.' + items: + type: string + type: array + match: + description: |- + Match is a case-insensitive glob ("gpt-5*", "*deepseek-r1*") that lets + one entry describe a family. Exact ids and aliases win over patterns; + among patterns the longest literal prefix wins. + type: string + max_output_tokens: + type: integer + name: + type: string + reasoning: + description: Reasoning reports whether the model can emit thinking at all. + type: boolean + source: + description: Source is the documentation URL the facts were taken from. + type: string + thinking_levels: + allOf: + - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_models_api.ThinkingLevelMap' + description: |- + ThinkingLevels maps protocol-neutral levels to vendor values; missing + keys inherit the vendor map. See api.ThinkingLevelMap. + type: + allOf: + - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ModelType' + description: |- + Type is the WeKnora model type this entry describes. Chat models with + image input are still KnowledgeQA; the UI derives VLM eligibility from + Input. Embedding / Rerank / ASR entries exist for the model picker. + type: object + github_com_Tencent_WeKnora_internal_models_api.API: + enum: + - openai-completions + - openai-responses + - anthropic-messages + - google-generative-ai + - ollama + type: string + x-enum-varnames: + - APIOpenAICompletions + - APIOpenAIResponses + - APIAnthropicMessages + - APIGoogleGenerativeAI + - APIOllama + github_com_Tencent_WeKnora_internal_models_api.ReasoningEffort: + enum: + - "off" + - auto + - minimal + - low + - medium + - high + - xhigh + - max + type: string + x-enum-varnames: + - ReasoningOff + - ReasoningAuto + - ReasoningMinimal + - ReasoningLow + - ReasoningMedium + - ReasoningHigh + - ReasoningXHigh + - ReasoningMax + github_com_Tencent_WeKnora_internal_models_api.ThinkingLevelMap: + additionalProperties: + type: string + type: object github_com_Tencent_WeKnora_internal_models_limiter.RuntimeStat: properties: active: @@ -273,6 +477,14 @@ definitions: back on the assistant message — required by MiMo / DeepSeek V3.2+ thinking mode, ignored by providers that don't recognize the field. type: string + reasoning_metadata: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ProviderMetadata' + reasoning_signature: + description: |- + ReasoningSignature / ReasoningMetadata are the provider artifacts that + must accompany ReasoningContent on replay (Anthropic signatures, + OpenAI Responses encrypted reasoning items). + type: string thought: description: LLM's reasoning/thinking (Think phase) type: string @@ -284,6 +496,14 @@ definitions: items: $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ToolCall' type: array + truncated: + description: |- + Truncated marks the round the completion-token cap cut off. It rides in + the agent_steps JSON so a reloaded, shared or re-opened conversation can + still show that the answer stops mid-sentence by design, rather than + looking finished. Live streaming carries the same fact on the answer + event; this is what survives the round trip. + type: boolean user_messages_before: description: |- UserMessagesBefore records consumed steer rows in delivery order, before @@ -888,7 +1108,8 @@ definitions: this factor type: number history_turns: - description: Number of history turns to keep in context. Quick-answer only; smart-reasoning sizes history by context window + description: Number of history turns to keep in context. Quick-answer only; + smart-reasoning sizes history by context window type: integer image_storage_provider: description: |- @@ -982,6 +1203,12 @@ definitions: QuestionSuggestions owns both the static/knowledge-backed prompts shown before the first user turn and the contextual follow-up questions shown after a completed assistant answer. + reasoning_effort: + description: |- + ReasoningEffort selects the thinking intensity (off | auto | minimal | + low | medium | high | xhigh | max). Empty keeps the boolean Thinking + semantics: true means "auto". See internal/models/api.ReasoningEffort. + type: string rerank_model_id: description: ReRank model ID for retrieval type: string @@ -1438,6 +1665,23 @@ definitions: suppress_when_answer_asks_question: type: boolean type: object + github_com_Tencent_WeKnora_internal_types.GalleryUserPrefs: + properties: + mode: + description: |- + Mode is "all" (every search-eligible field active) or "custom" + (per-field Status governs). Empty = "all". + type: string + status: + additionalProperties: + type: string + description: |- + Status maps a namespaced attribute id ("builtin:caption") to + "on"/"off". Only consulted in custom mode; an unrecorded field is + off. Source-declared on/off does not exist — activation is always + the user's own record. + type: object + type: object github_com_Tencent_WeKnora_internal_types.GraphNode: properties: attributes: @@ -1460,8 +1704,67 @@ definitions: type: type: string type: object + github_com_Tencent_WeKnora_internal_types.ImageActionsConfig: + properties: + ocr: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ImageOCRAction' + type: object + github_com_Tencent_WeKnora_internal_types.ImageAttrCondition: + properties: + is: + type: string + prop: + type: string + type: object + github_com_Tencent_WeKnora_internal_types.ImageOCRAction: + properties: + "on": + description: |- + On is the list of attribute conditions that enable OCR. Matching any one + turns OCR on. + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ImageAttrCondition' + type: array + on_unobserved: + description: |- + OnUnobserved is the OCR decision used when the observation does not + answer for one of the attributes the policy reads — the attribute is + absent because the model skipped the line, or because the value it wrote + was not one of the allowed ones. The default is true: an incomplete + observation keeps extracting, so a missed block of text costs one extra + call instead of being lost. Turn it off only with a model reliable enough + to answer every attribute line. + type: boolean + type: object github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig: properties: + image_actions: + allOf: + - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ImageActionsConfig' + description: |- + ImageActions overrides the built-in attribute→work table (see + DefaultImageActions). A nil value keeps the conservative default: run OCR + for block text, data visuals, and unobserved images. + image_attrs_enabled: + description: |- + ImageAttrsEnabled turns the attribute-observed image pipeline on for this + knowledge base. It is off by default on purpose, so upgrading an + existing deployment never changes what happens to documents already + being ingested: with it off every image is described and OCR'd exactly + as before. When on, the describe round also observes image attributes and + the attribute policy decides whether OCR runs for it. A single upload can + override it per document through + KnowledgeProcessOverrides.ImageAttrsEnabled. + type: boolean + image_vector_enabled: + description: |- + ImageVectorEnabled lets a knowledge base whose embedding model takes + images index each image by its own vector and recall it with one. It + is off by default on purpose: a model that takes images is also used + for plain text, and turning this on costs an embedding call per image + and widens vector recall. Existing knowledge bases stay off after an + upgrade because the stored JSON has no such key. + type: boolean model_id: description: Model ID type: string @@ -1541,9 +1844,9 @@ definitions: properties: representative_user_id: description: |- - RepresentativeUserID identifies the user attached to the OTM row for - display/audit. Optional: when unset, the handler picks a stable default - (the user from the legacy UserID field, or the workspace's owner). + RepresentativeUserID is accepted for compatibility and ignored: a + direct add attaches no user of the enrolled workspace, since the + inviter must not choose whose details the roster shows. type: string role: allOf: @@ -1556,8 +1859,7 @@ definitions: user_id: description: |- UserID is retained for backward compatibility. When set without - TenantID, the handler resolves the user's TenantID and uses this - user as the representative. + TenantID, the handler resolves the user's TenantID. type: string required: - role @@ -1667,6 +1969,13 @@ definitions: - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQConfig' description: FAQConfig stores FAQ specific configuration such as indexing strategy + generated_profile: + allOf: + - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfile' + description: |- + GeneratedProfile is the machine-generated description: a gist, merged + topics, typical questions and the aggregate snapshot they came from. It + never overwrites the user-authored Description; both are shown to agents. id: description: Unique identifier of the knowledge base type: string @@ -1714,6 +2023,12 @@ definitions: description: ProcessingCount indicates the number of knowledge items being processed (for document type knowledge bases) type: integer + profile_config: + allOf: + - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileConfig' + description: |- + ProfileConfig controls automatic generation of the knowledge-base + description from per-document profiles (document knowledge bases only). question_generation_config: allOf: - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig' @@ -1787,18 +2102,124 @@ definitions: image_processing_config: allOf: - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig' - description: Image processing configuration + description: |- + Image processing configuration. + + nil means "no change" when updating, the same contract IndexingStrategy + uses. A request that does not mention this field must leave the image + settings alone: the attribute-observation switch and the attribute policy + are things a knowledge base accumulates, and a client that predates them + would otherwise reset the lot on any save. Sending an object — empty + included — replaces the whole configuration. indexing_strategy: allOf: - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.IndexingStrategy' description: |- IndexingStrategy controls which indexing pipelines are active. nil means "no change" when updating (preserves existing strategy). + profile_config: + allOf: + - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileConfig' + description: |- + ProfileConfig controls optional automatic knowledge-base description + generation. nil means "no change" when updating. wiki_config: allOf: - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiConfig' description: Wiki configuration (only for wiki-enabled knowledge bases) type: object + github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfile: + properties: + aggregate_hash: + description: |- + AggregateHash identifies the aggregate the gist was generated from. A + mismatch with the live aggregate means the text is stale. + type: string + error: + description: Error holds the last generation error when Status is failed. + type: string + generated_at: + description: GeneratedAt records when the text was produced. + type: string + gist: + description: Gist is a short statement of what the knowledge base covers. + type: string + model_id: + description: ModelID records which chat model produced the text. + type: string + stats: + allOf: + - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileStats' + description: Stats is the aggregate snapshot the text was generated from. + status: + description: Status is one of the KnowledgeBaseProfileStatus* values. + type: string + topics: + description: Topics is the merged topic list (at most KnowledgeBaseProfileMaxTopics). + items: + type: string + type: array + typical_questions: + description: TypicalQuestions lists questions this knowledge base can answer. + items: + type: string + type: array + type: object + github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileConfig: + properties: + custom_instructions: + description: |- + CustomInstructions is appended to the stable system prompt, e.g. the + audience the description should address or terms to keep. + type: string + enabled: + type: boolean + model_id: + description: ModelID overrides the chat model; empty falls back to the KB + summary model. + type: string + type: object + github_com_Tencent_WeKnora_internal_types.KnowledgeBaseProfileStats: + properties: + doc_types: + description: DocTypes counts documents per model-assigned document type. + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.NamedCount' + type: array + document_count: + description: DocumentCount is the number of eligible documents at generation + time. + type: integer + earliest_at: + description: EarliestAt and LatestAt bound document creation times. + type: string + file_types: + description: FileTypes counts documents per file extension. + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.NamedCount' + type: array + folders: + description: Folders lists the top-level folder names present. + items: + type: string + type: array + latest_at: + type: string + profiled_count: + description: ProfiledCount is how many of them carried a document profile. + type: integer + raw_topics: + description: RawTopics counts documents per normalized topic keyword before + merging. + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.NamedCount' + type: array + tags: + description: Tags counts documents per knowledge-base tag. + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.NamedCount' + type: array + type: object github_com_Tencent_WeKnora_internal_types.KnowledgeBaseShareResponse: properties: chunk_count: @@ -1884,6 +2305,24 @@ definitions: $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ExtractConfig' graph_enabled: type: boolean + image_actions: + allOf: + - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ImageActionsConfig' + description: |- + ImageActions overrides rows of the attribute->work table for this document + (merged per action key on top of the knowledge base's table). + nil keeps the knowledge base's setting. + image_attrs_enabled: + description: |- + ImageAttrsEnabled overrides the knowledge base's attribute-observed image + pipeline switch for this one document. nil keeps the knowledge base's + setting. + type: boolean + image_vector_enabled: + description: |- + ImageVectorEnabled overrides image vector indexing for this document. + It does not change the KB-wide retrieval setting or embedding model. + type: boolean parser_engine_overrides: additionalProperties: type: string @@ -2197,6 +2636,15 @@ definitions: - MatchTypeWebSearch - MatchTypeDirectLoad - MatchTypeDataAnalysis + github_com_Tencent_WeKnora_internal_types.MatchedImage: + properties: + chunk_id: + type: string + knowledge_base_id: + type: string + url: + type: string + type: object github_com_Tencent_WeKnora_internal_types.Membership: properties: role: @@ -2325,6 +2773,10 @@ definitions: Skill-generated files produced during this assistant turn (assistant messages only). Populated by ArtifactCollector after the sandbox finishes, referenced by the artifact download endpoint. Empty for user messages and turns without skills. + + Stored in the message_artifacts table, not on the message row: the message + repository loads it with every message it returns and writes it whenever it + is non-nil on create or update. A nil slice leaves the stored rows alone. items: $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MessageArtifact' type: array @@ -2430,6 +2882,16 @@ definitions: created_at: description: When WeKnora persisted the blob type: string + deleted_at: + description: |- + DeletedAt marks a file the user deleted. The entry stays in the list + rather than being removed because its position IS the download address + (msg.Artifacts[index]); dropping it would shift every later file's index + and hand an old link the wrong blob. Keeping it also keeps the entry in + ArtifactCollector's de-duplication set, so the next collect does not + re-attach the very file that was deleted — its sandbox mtime has not + moved. Clients filter these out; the bytes are already reclaimed. + type: string file_name: description: Original filename inside the sandbox type: string @@ -2566,6 +3028,13 @@ definitions: provider: description: 'Provider identifier: openai, aliyun, zhipu, generic' type: string + spec: + allOf: + - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSpecOverride' + description: |- + Spec overrides the catalog entry for this row: protocol, capability + flags and the flat protocol compat object. Everything omitted is + inherited from the vendor catalog (see internal/models/catalog). supports_vision: description: Whether the model accepts image/multimodal input type: boolean @@ -2652,6 +3121,31 @@ definitions: - ModelSourceNvidia - ModelSourceNovita - ModelSourceAzureOpenAI + github_com_Tencent_WeKnora_internal_types.ModelSpecOverride: + properties: + api: + type: string + compat: + additionalProperties: {} + description: |- + Compat is a plain object so it round-trips through both JSON (API, + database column) and YAML (builtin_models.yaml). + type: object + context_window: + type: integer + input: + items: + type: string + type: array + max_output_tokens: + type: integer + reasoning: + type: boolean + thinking_levels: + additionalProperties: + type: string + type: object + type: object github_com_Tencent_WeKnora_internal_types.ModelType: enum: - Embedding @@ -2678,6 +3172,13 @@ definitions: - ModelTypeKnowledgeQA - ModelTypeVLLM - ModelTypeASR + github_com_Tencent_WeKnora_internal_types.NamedCount: + properties: + count: + type: integer + name: + type: string + type: object github_com_Tencent_WeKnora_internal_types.OBSEngineConfig: properties: access_key: @@ -2863,10 +3364,16 @@ definitions: mineru_language: type: string mineru_model: - description: MinerU 自建解析参数 + description: 以下 backend、vLLM、公式/表格、语言参数仅对 3.x 及更早版本生效。 type: string mineru_parse_method: type: string + mineru_server_api_key: + description: MinerU 自建解析参数。协议按服务端自动识别:4.0+ 走 V1 API,更早版本走 /file_parse。 + type: string + mineru_tier: + description: 4.0+:flash/basic/standard/advanced,空为服务端默认 + type: string mineru_vlm_server_url: description: vLLM 服务器地址 (vlm-http-client / hybrid-http-client) type: string @@ -2929,6 +3436,12 @@ definitions: - PromptCacheStatusUnreported - PromptCacheStatusMiss - PromptCacheStatusHit + github_com_Tencent_WeKnora_internal_types.ProviderMetadata: + additionalProperties: + items: + type: integer + type: array + type: object github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig: properties: custom_instructions: @@ -3039,6 +3552,27 @@ definitions: required: - requested_role type: object + github_com_Tencent_WeKnora_internal_types.RerankOptions: + properties: + enabled: + description: Enabled turns the rerank stage off when explicitly false. Nil + means on. + type: boolean + model_id: + description: |- + ModelID selects the rerank model. Empty falls back to the tenant + RetrievalConfig, then to the first rerank model of the tenant. + type: string + threshold: + description: |- + Threshold is the minimum rerank model score. Nil uses the tenant + RetrievalConfig. A pointer because 0 and negative scores are valid. + type: number + top_k: + description: TopK caps the reranked results. Zero uses the endpoint's result + count. + type: integer + type: object github_com_Tencent_WeKnora_internal_types.Resource: properties: description: @@ -3394,6 +3928,13 @@ definitions: QueryText is required unless query_embedding is provided, keyword matching is disabled, and vector matching remains enabled. type: string + rerank: + allOf: + - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RerankOptions' + description: |- + Rerank, when present and enabled, reranks the fused candidates before + truncating to MatchCount. Only the hybrid-search API reads it; internal + callers rerank on their own. scope_tag_ids: items: type: string @@ -3477,6 +4018,13 @@ definitions: MatchedContent is the actual content that was matched in vector search For FAQ: this is the matched question text (standard or similar question) type: string + matched_images: + description: |- + MatchedImages survives merging, deduplication and stored reference replay. + It contains storage references, never image bytes. + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MatchedImage' + type: array metadata: additionalProperties: type: string @@ -3491,6 +4039,13 @@ definitions: seq: description: Seq type: integer + source_locators: + description: |- + SourceLocators point back into the original file for citation + navigation. Merged results carry the union of their chunks' locators. + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SourceLocator' + type: array start_at: description: Start at type: integer @@ -3516,6 +4071,16 @@ definitions: before it were copied here. For an assistant point, that answer is included so the branch continues after it. type: string + host_workspace_dir: + description: |- + HostWorkspaceDir is the user-selected project directory this session + operates in, for the WeKnora Lite host sandbox only. Empty means the session + gets an auto-allocated workspace instead. + + Written once at creation and never updated: re-pointing a live session + at a different directory would leave its transcript describing files + that are no longer there. Standard edition never writes it. + type: string id: description: ID type: string @@ -3599,6 +4164,8 @@ definitions: type: array model_id: type: string + reasoning_effort: + type: string skill_names: items: type: string @@ -3646,6 +4213,74 @@ definitions: template. type: string type: object + github_com_Tencent_WeKnora_internal_types.SourceLocator: + properties: + bbox: + description: |- + BBox is [x0, y0, x1, y1] as fractions of the page width and height, + origin at the top-left corner of the rendered page. + items: + type: number + type: array + block: + description: Block is the 1-based index among a Word file's body paragraphs + and tables. + type: integer + end: + type: integer + end_ms: + type: integer + mapping: + description: Mapping records verified text-to-source alignment. Empty means + legacy. + type: string + page: + description: Page is the 1-based PDF page. + type: integer + partial: + description: Partial means some of the chunk has no source mapping. + type: boolean + quote: + description: |- + Quote is the complete cited overlap as parsed. Viewers match it + inside the rendered original and against the + answer sentence that cites the chunk. + type: string + row_end: + type: integer + row_start: + type: integer + section: + description: Section is the 1-based EPUB spine index. + type: integer + sheet: + description: |- + Sheet is the spreadsheet sheet name; RowStart/RowEnd are its 1-based + row numbers as shown by spreadsheet applications. + type: string + slide: + description: Slide is the 1-based slide number in presentation order. + type: integer + source_hash: + description: SourceHash binds the locator to the knowledge record’s source + revision hash. + type: string + source_id: + description: SourceID identifies a block within the parser result, not a rendered + item. + type: string + start: + description: Start/End are rune offsets into the original text file. + type: integer + start_ms: + description: StartMs/EndMs bound an audio segment. + type: integer + title: + description: Title names the section or slide when the source has one. + type: string + type: + type: string + type: object github_com_Tencent_WeKnora_internal_types.StarterSuggestionConfig: properties: count: @@ -4310,6 +4945,16 @@ definitions: description: BrowserSearchInstructions customizes browser search for this user. Nil/empty uses the platform default. type: string + gallery: + allOf: + - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.GalleryUserPrefs' + description: |- + Gallery holds the user's image-gallery UI state: the search + activation mode and the per-attribute search-field toggles. Written + by the gallery's mode / checkbox interactions via the preferences + PUT; read back by GET /knowledge-bases/:id/gallery-config so the + gallery renders the same activation state on every device. Nil = the + user never touched the gallery controls (mode defaults to "all"). last_active_tenant_id: description: |- LastActiveTenantID remembers the last workspace the user actively @@ -5288,6 +5933,13 @@ definitions: required: - source_id type: object + internal_handler.CopyModelRequest: + properties: + display_name: + type: string + required: + - display_name + type: object internal_handler.CreateAgentRequest: properties: avatar: @@ -5677,6 +6329,19 @@ definitions: required: - llmModelId type: object + internal_handler.ListAllUsersResponse: + properties: + has_more: + type: boolean + limit: + type: integer + offset: + type: integer + users: + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.UserInfo' + type: array + type: object internal_handler.ListSystemAdminsResponse: properties: admins: @@ -5725,6 +6390,8 @@ definitions: source: description: 为空时按需默认为 "remote" type: string + spec: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSpecOverride' supportsDimensionOverride: type: boolean required: @@ -5917,6 +6584,8 @@ definitions: source: description: 为空时按需默认为 "remote" type: string + spec: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSpecOverride' supportsDimensionOverride: type: boolean required: @@ -6086,6 +6755,31 @@ definitions: required: - query type: object + internal_handler.SearchWikiRequest: + properties: + knowledge_base_id: + type: string + knowledge_base_ids: + items: + type: string + type: array + limit: + type: integer + query: + type: string + required: + - query + type: object + internal_handler.SetUserStatusRequest: + properties: + is_active: + type: boolean + user_id: + type: string + required: + - is_active + - user_id + type: object internal_handler.StorageCheckRequest: properties: cos: @@ -6208,6 +6902,13 @@ definitions: type: string name: type: string + vlm_config: + allOf: + - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.VLMConfig' + description: |- + VLMConfig updates the knowledge base's multimodal (vision) config. + Optional: nil means "no change", mirroring how CreateKnowledgeBase + accepts a top-level vlm_config. required: - name type: object @@ -6368,6 +7069,46 @@ definitions: required: - name type: object + internal_handler.imageListRequestBody: + properties: + attr_filters: + additionalProperties: + items: + type: string + type: array + type: object + attr_rules: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + is_enabled: + type: boolean + keyword: + type: string + knowledge_ids: + items: + type: string + type: array + page: + description: Page + minimum: 1 + type: integer + page_size: + description: Page size + maximum: 1000 + minimum: 1 + type: integer + search_in: + items: + type: string + type: array + sort_by: + type: string + sort_order: + type: string + type: object internal_handler.invitationLookupRequest: properties: token: @@ -6597,6 +7338,10 @@ definitions: - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.QuestionOrigin' description: QuestionOrigin is the knowledge source of a picked suggested question. + reasoning_effort: + description: ReasoningEffort overrides thinking for this request; empty inherits + the agent configuration. + type: string skill_names: description: Per-request Skills selected via @mention items: @@ -6622,6 +7367,12 @@ definitions: description: description: Description for the session (optional) type: string + project_dir: + description: |- + ProjectDir is an optional Lite host-sandbox binding. When set it must + be an absolute path already present in the user-approved ProjectDirs + list. Empty means the session gets an auto-allocated workspace. + type: string title: description: Title for the session (optional) type: string @@ -6688,8 +7439,28 @@ definitions: description: '"kb", "file", "tag", "mcp", "skill"' type: string type: object + internal_handler_session.RewindSessionRequest: + properties: + message_id: + description: |- + MessageID is the message to rewind to. A user message deletes itself and + everything after (the client prefills that question). An assistant + message keeps itself and deletes everything after. + type: string + required: + - message_id + type: object internal_handler_session.SearchKnowledgeRequest: properties: + disable_keywords_match: + description: Vector recall only + type: boolean + disable_vector_match: + description: Keyword recall only + type: boolean + keyword_threshold: + description: Minimum keyword score + type: number knowledge_base_id: description: Single knowledge base ID (for backward compatibility) type: string @@ -6703,6 +7474,9 @@ definitions: items: type: string type: array + match_count: + description: Number of results to return + type: integer mentioned_items: description: Optional scoped tag mentions items: @@ -6711,11 +7485,19 @@ definitions: query: description: Query text to search for type: string + rerank: + allOf: + - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RerankOptions' + description: Rerank override tag_ids: description: Tag IDs for filtering within a single KB items: type: string type: array + vector_threshold: + description: Optional overrides of the tenant retrieval config. Omitted fields + keep it. + type: number required: - query type: object @@ -7247,21 +8029,64 @@ paths: summary: 获取智能体类型预设列表 tags: - 智能体 - /api/v1/knowledge/{id}/spans: - get: - consumes: - - application/json - description: 返回该知识在解析流水线的 trace tree(root → stage → subspan):每段状态、耗时、input/output、错误码、langfuse_trace_id。支持 - ?attempt=N 查看历史尝试;不传则返回最新尝试。前端用于渲染时间线 + 多模态/embedding 子节点 + 一键跳转 Langfuse。 + /artifacts: + delete: + description: 删除产物库中的一个文件。产物库一行代表一个文件的最新版本,默认连同该文件在本会话中的所有历史版本一并删除 parameters: - - description: 知识ID - in: path - name: id + - description: 会话ID + in: query + name: session_id required: true type: string - - description: 指定尝试号;省略=最新 + - description: 消息ID in: query - name: attempt + name: message_id + required: true + type: string + - description: 产物在消息中的位置 + in: query + name: index + required: true + type: integer + - description: 是否删除所有版本,默认 true + in: query + name: all_versions + type: boolean + produces: + - application/json + responses: + "200": + description: OK + schema: + additionalProperties: true + type: object + "404": + description: Not Found + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + security: + - Bearer: [] + summary: 删除产物库中的文件 + tags: + - 会话 + get: + description: 跨会话列出当前用户可见会话中技能生成的文件,每个文件只返回最新版本(不含存储 URL) + parameters: + - description: 按文件名过滤 + in: query + name: keyword + type: string + - description: 逗号分隔的扩展名,如 .pdf,.pptx + in: query + name: file_types + type: string + - description: 页码 + in: query + name: page + type: integer + - description: 每页数量(最大 100) + in: query + name: page_size type: integer produces: - application/json @@ -7271,9 +8096,12 @@ paths: schema: additionalProperties: true type: object - summary: 获取知识文档解析的 Span 树(含历史尝试) + security: + - Bearer: [] + - ApiKeyAuth: [] + summary: 列出我的产物 tags: - - 知识管理 + - 会话 /auth/auto-setup: post: consumes: @@ -7624,7 +8452,7 @@ paths: consumes: - application/json description: |- - 通过 Owner 生成的共享邀请链接 token 完成注册,绕过 invite_only 模式拦截。 + 通过共享邀请链接 token 完成注册,仅 self_serve / invite_register 模式允许。 注册者自填邮箱(与 token 不绑定);注册成功后自动加入对应空间。 parameters: - description: 邀请注册请求 @@ -7644,6 +8472,10 @@ paths: description: 请求参数错误 schema: $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + "403": + description: 注册功能已禁用 + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' "409": description: 邮箱已注册 schema: @@ -8509,14 +9341,14 @@ paths: put: consumes: - application/json - description: 更新指定 IM 渠道的名称、模式、知识库、凭证或启用状态 + description: 更新指定 IM 渠道的名称、模式、回复语言、知识库、凭证或启用状态 parameters: - description: 渠道 ID in: path name: id required: true type: string - - description: 更新字段(name/mode/output_mode/knowledge_base_id/credentials/enabled) + - description: 更新字段(含 locale) in: body name: request required: true @@ -9852,7 +10684,8 @@ paths: get: consumes: - application/json - description: 在知识库中执行向量和关键词混合搜索。推荐使用 POST;GET 携带 JSON 请求体仍受支持(兼容旧客户端)。 + description: 底层召回:向量+关键词混合检索,默认不 rerank(可用 rerank 字段开启);一般检索请用 /knowledge-search。推荐 + POST,GET 带 JSON 体仅兼容旧客户端。 parameters: - description: 知识库ID in: path @@ -9894,7 +10727,8 @@ paths: post: consumes: - application/json - description: 在知识库中执行向量和关键词混合搜索。推荐使用 POST;GET 携带 JSON 请求体仍受支持(兼容旧客户端)。 + description: 底层召回:向量+关键词混合检索,默认不 rerank(可用 rerank 字段开启);一般检索请用 /knowledge-search。推荐 + POST,GET 带 JSON 体仅兼容旧客户端。 parameters: - description: 知识库ID in: path @@ -9933,6 +10767,109 @@ paths: summary: 混合搜索 tags: - 知识库 + /knowledge-bases/{id}/images: + get: + consumes: + - application/json + description: 浏览某知识库内的全部图片资产,支持关键字搜索(caption/OCR 文本)、按图片属性筛选(attr_filters / attr_rules)与排序分页。 + parameters: + - description: 知识库 ID + in: path + name: id + required: true + type: string + - description: 页码,默认 1 + in: query + name: page + type: integer + - description: 每页数量,默认 20,最大 1000 + in: query + name: page_size + type: integer + - description: 关键字,对 search_in 指定字段做不区分大小写的子串匹配 + in: query + name: keyword + type: string + - description: 参与搜索的属性 ID(逗号分隔);须为 in_searchfield=true + in: query + name: search_in + type: string + - description: 排序属性 ID;须为 in_sortfield=true,默认 created_at + in: query + name: sort_by + type: string + - description: 排序方向:asc / desc,默认 desc + in: query + name: sort_order + type: string + - description: 仅包含启用状态的图片 + in: query + name: is_enabled + type: boolean + - description: 来源文档 ID 列表(逗号分隔,最多 50 个),仅返回这些文档的图片 + in: query + name: knowledge_ids + type: string + - description: 属性筛选 JSON,同一属性多值 OR、属性间 AND + in: query + name: attr_filters + type: string + - description: 属性逐值裁决 JSON(off 隐藏 / on 强制显示,on 优先) + in: query + name: attr_rules + type: string + produces: + - application/json + responses: + "200": + description: 图片资产分页列表 + schema: + additionalProperties: true + type: object + "400": + description: 请求参数错误 + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + security: + - Bearer: [] + - ApiKeyAuth: [] + summary: 列出知识库图片资产 + tags: + - knowledge + post: + consumes: + - application/json + description: 与 GET /images 同义,筛选参数改经 JSON body 传递:knowledge_ids 不再受 URL 长度限制(上限 + 1000),供来源文档全选使用。 + parameters: + - description: 知识库 ID + in: path + name: id + required: true + type: string + - description: 筛选参数(与 GET /images 同名参数同义) + in: body + name: body + schema: + $ref: '#/definitions/internal_handler.imageListRequestBody' + produces: + - application/json + responses: + "200": + description: 图片资产分页列表 + schema: + additionalProperties: true + type: object + "400": + description: 请求参数错误 + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + security: + - Bearer: [] + - ApiKeyAuth: [] + summary: 列出知识库图片资产(body 版) + tags: + - knowledge /knowledge-bases/{id}/knowledge: delete: consumes: @@ -10021,6 +10958,14 @@ paths: in: query name: folder_recursive type: boolean + - description: '排序字段: updated_at/created_at/file_name,默认 created_at' + in: query + name: sort_by + type: string + - description: '排序方向: asc/desc,默认 desc' + in: query + name: sort_order + type: string produces: - application/json responses: @@ -10369,6 +11314,33 @@ paths: summary: 置顶/取消置顶知识库 tags: - 知识库 + /knowledge-bases/{id}/profile/generate: + post: + description: 基于文档画像聚合,立即重新生成知识库的 AI 描述(不覆盖手写描述) + parameters: + - description: 知识库ID + in: path + name: id + required: true + type: string + produces: + - application/json + responses: + "200": + description: 生成的知识库画像 + schema: + additionalProperties: true + type: object + "400": + description: 知识库类型不支持或未配置模型 + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + security: + - Bearer: [] + - ApiKeyAuth: [] + summary: 生成知识库描述 + tags: + - 知识库 /knowledge-bases/{id}/shares: get: description: 获取知识库的所有共享记录 @@ -10764,7 +11736,8 @@ paths: post: consumes: - application/json - description: 在知识库中搜索(不使用LLM总结) + description: 在知识库中搜索(不使用LLM总结)。与产品内问答使用同一检索流程(召回、rerank、合并),外部检索首选;可覆盖召回参数与 + rerank parameters: - description: 搜索请求 in: body @@ -11030,6 +12003,36 @@ paths: summary: 重新解析知识 tags: - 知识管理 + /knowledge/{id}/spans: + get: + consumes: + - application/json + description: 返回该知识在解析流水线的 trace tree(root → stage → subspan):每段状态、耗时、input/output、错误码、langfuse_trace_id。支持 + ?attempt=N 查看历史尝试;不传则返回最新尝试。前端用于渲染时间线 + 多模态/embedding 子节点 + 一键跳转 Langfuse。 + parameters: + - description: 知识ID + in: path + name: id + required: true + type: string + - description: 指定尝试号;省略=最新 + in: query + name: attempt + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + additionalProperties: true + type: object + security: + - Bearer: [] + - ApiKeyAuth: [] + summary: 获取知识文档解析的 Span 树(含历史尝试) + tags: + - 知识管理 /knowledge/batch: get: consumes: @@ -12305,6 +13308,15 @@ paths: consumes: - application/json description: 获取当前空间的所有MCP服务(含已保存工具目录数量) + parameters: + - description: Agent ID; needs agent_source_tenant_id + in: query + name: agent_id + type: string + - description: Shared agent source workspace + in: query + name: agent_source_tenant_id + type: integer produces: - application/json responses: @@ -12317,6 +13329,10 @@ paths: description: 请求参数错误 schema: $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + "403": + description: 无权使用该共享智能体 + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -13768,13 +14784,89 @@ paths: summary: 更新模型 tags: - 模型管理 + /models/{id}/copy: + post: + consumes: + - application/json + description: 复制模型配置。name 与源模型一致,凭证从已存记录复制,不接受客户端重传。 + parameters: + - description: 源模型ID + in: path + name: id + required: true + type: string + - description: 副本展示名 + in: body + name: request + required: true + schema: + $ref: '#/definitions/internal_handler.CopyModelRequest' + produces: + - application/json + responses: + "201": + description: 复制的模型 + schema: + additionalProperties: true + type: object + "400": + description: 请求参数错误 + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + "404": + description: 模型不存在 + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + security: + - Bearer: [] + - ApiKeyAuth: [] + summary: 复制模型 + tags: + - 模型管理 + /models/catalog/resolve: + get: + consumes: + - application/json + description: 根据厂商、模型名、Base URL 与 extra_config 返回目录解析结果(协议、思考等级、上下文等),供模型编辑器实时展示 + parameters: + - description: 厂商标识 + in: query + name: provider + required: true + type: string + - description: 模型名 + in: query + name: model + type: string + - description: Base URL + in: query + name: base_url + type: string + - description: 模型类型 + in: query + name: model_type + type: string + produces: + - application/json + responses: + "200": + description: 解析结果 + schema: + additionalProperties: true + type: object + security: + - Bearer: [] + - ApiKeyAuth: [] + summary: 解析模型的有效接入配置 + tags: + - 模型管理 /models/providers: get: consumes: - application/json - description: 根据模型类型获取支持的厂商列表及配置信息 + description: 根据模型类型获取支持的厂商定义(含图标、默认地址、额外字段、内置模型目录与思考能力) parameters: - - description: 模型类型 (chat, embedding, rerank, vllm) + - description: 模型类型 (chat, embedding, rerank, vllm, asr) in: query name: model_type type: string @@ -15519,6 +16611,46 @@ paths: /sessions/{session_id}/messages/{message_id}/artifacts: get: responses: {} + /sessions/{session_id}/messages/{message_id}/artifacts/{index}: + delete: + description: 删除某条 assistant 消息生成的单个文件;all_versions=true 时连同本会话中该文件的所有历史版本一并删除 + parameters: + - description: 会话ID + in: path + name: session_id + required: true + type: string + - description: 消息ID + in: path + name: message_id + required: true + type: string + - description: 产物在消息中的位置 + in: path + name: index + required: true + type: integer + - description: 是否删除该文件的所有版本 + in: query + name: all_versions + type: boolean + produces: + - application/json + responses: + "200": + description: OK + schema: + additionalProperties: true + type: object + "404": + description: Not Found + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + security: + - Bearer: [] + summary: 删除会话中的产物文件 + tags: + - 会话 /sessions/{session_id}/messages/{message_id}/artifacts/{index}/download: get: responses: {} @@ -15615,6 +16747,53 @@ paths: summary: 置顶会话 tags: - 会话 + /sessions/{session_id}/rewind: + post: + consumes: + - application/json + description: 回滚当前会话到指定用户或助手消息:删除其后消息,可到达时 git reset 工作区。 + parameters: + - description: 会话 ID + in: path + name: session_id + required: true + type: string + - description: 回滚请求 + in: body + name: request + required: true + schema: + $ref: '#/definitions/internal_handler_session.RewindSessionRequest' + produces: + - application/json + responses: + "200": + description: 回滚结果 + schema: + additionalProperties: true + type: object + "400": + description: 请求参数错误 / 回滚点角色不支持 + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + "404": + description: 会话或消息不存在 + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + "409": + description: 会话正在生成中 / 无检查点 / 沙箱已更换 + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + "500": + description: 工作区回滚失败 + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + security: + - Bearer: [] + - ApiKeyAuth: [] + summary: 回滚会话 + tags: + - 会话 /sessions/{session_id}/steer: post: consumes: @@ -15909,10 +17088,18 @@ paths: - application/json description: 返回指定沙箱配置镜像内、智能体实际能调用的已安装技能(ready 且启用)。不传 sandbox_config_id 时列表为空。 parameters: - - description: Sandbox config ID + - description: Sandbox config ID; ignored for a shared agent in: query name: sandbox_config_id type: string + - description: Agent ID; needs agent_source_tenant_id + in: query + name: agent_id + type: string + - description: Shared agent source workspace + in: query + name: agent_source_tenant_id + type: integer produces: - application/json responses: @@ -15921,6 +17108,10 @@ paths: schema: additionalProperties: true type: object + "403": + description: 无权使用该共享智能体 + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -16494,6 +17685,141 @@ paths: summary: List all system administrators tags: - System Admin + /system/admin/model-catalog: + get: + description: |- + System administrator JWT only; API keys are not accepted. Returns built-in, deployment and effective + catalogs, the current overlay, version/baseline tokens, and the latest 20 published revisions. + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogState' + "401": + description: Unauthorized + schema: + additionalProperties: true + type: object + "403": + description: Forbidden + schema: + additionalProperties: true + type: object + "503": + description: Service Unavailable + schema: + additionalProperties: true + type: object + security: + - Bearer: [] + summary: Get the system model catalog + tags: + - 系统管理 + put: + consumes: + - application/json + description: |- + System administrator JWT only; API keys are not accepted. Validates and publishes a new overlay + revision using the current version and baseline. Stale values return 409. To restore a historical + configuration, submit its overlay with the current version and baseline. + parameters: + - description: Version, baseline and overlay object (max 1 MiB) + in: body + name: request + required: true + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogUpdate' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogState' + "400": + description: Bad Request + schema: + additionalProperties: true + type: object + "401": + description: Unauthorized + schema: + additionalProperties: true + type: object + "403": + description: Forbidden + schema: + additionalProperties: true + type: object + "409": + description: Conflict + schema: + additionalProperties: true + type: object + "500": + description: Internal Server Error + schema: + additionalProperties: true + type: object + security: + - Bearer: [] + summary: Publish a model catalog overlay + tags: + - 系统管理 + /system/admin/model-catalog/preview: + post: + consumes: + - application/json + description: |- + System administrator JWT only; API keys are not accepted. Validates the overlay without publishing + it. Supply the current version and baseline; stale values return 409. The response contains the + candidate effective catalog and normalized overlay; history, builtin and deployment are null. + parameters: + - description: Version, baseline and overlay object (max 1 MiB) + in: body + name: request + required: true + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogUpdate' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_application_service.CatalogState' + "400": + description: Bad Request + schema: + additionalProperties: true + type: object + "401": + description: Unauthorized + schema: + additionalProperties: true + type: object + "403": + description: Forbidden + schema: + additionalProperties: true + type: object + "409": + description: Conflict + schema: + additionalProperties: true + type: object + "500": + description: Internal Server Error + schema: + additionalProperties: true + type: object + security: + - Bearer: [] + summary: Preview a model catalog overlay + tags: + - 系统管理 /system/admin/promote: post: consumes: @@ -16808,6 +18134,38 @@ paths: summary: Apply the default storage quota to every existing workspace tags: - System Admin + /system/admin/users: + get: + description: |- + Retrieve a paginated list of every user across tenants (SystemAdmin only). + Supports `offset` (default 0) and `limit` (default 50, max 200). + Password/hashes are never serialised — only the redacted UserInfo shape. + parameters: + - default: 0 + description: Page offset + in: query + name: offset + type: integer + - default: 50 + description: Page size (max 200) + in: query + name: limit + type: integer + produces: + - application/json + responses: + "200": + description: Users retrieved successfully + schema: + $ref: '#/definitions/internal_handler.ListAllUsersResponse' + "403": + description: 'Forbidden: not a system admin' + schema: + additionalProperties: true + type: object + summary: List all platform users + tags: + - System Admin /system/admin/users/create: post: consumes: @@ -16900,6 +18258,41 @@ paths: summary: Reset another user's password tags: - System Admin + /system/admin/users/status: + post: + consumes: + - application/json + description: |- + Disable revokes the target's active sessions immediately. + Self-disable and disabling the last active system administrator are rejected. + parameters: + - description: Account status request + in: body + name: request + required: true + schema: + $ref: '#/definitions/internal_handler.SetUserStatusRequest' + produces: + - application/json + responses: + "200": + description: Status updated + schema: + additionalProperties: true + type: object + "400": + description: Self-disable / last-admin guard + schema: + additionalProperties: true + type: object + "404": + description: User not found + schema: + additionalProperties: true + type: object + summary: Enable or disable a user account + tags: + - System Admin /system/capabilities: get: description: 返回当前部署版本及实际注册的后端路由所对应的功能能力;仅 supported=false 表示入口应隐藏 @@ -18381,6 +19774,37 @@ paths: summary: 保存 WeKnoraCloud 凭证 tags: - WeKnoraCloud + /wiki-search: + post: + consumes: + - application/json + description: Cross-KB wiki search using the same POSIX regex ranking as single-KB + wiki search + parameters: + - description: Wiki search request + in: body + name: request + required: true + schema: + $ref: '#/definitions/internal_handler.SearchWikiRequest' + produces: + - application/json + responses: + "200": + description: OK + schema: + additionalProperties: true + type: object + "400": + description: Bad Request + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + security: + - Bearer: [] + - ApiKeyAuth: [] + summary: Cross-KB wiki search + tags: + - Wiki securityDefinitions: ApiKeyAuth: description: API Key 认证:空间 Key 固定访问所属空间;平台 Key 调用空间接口时需同时传 X-Tenant-ID diff --git a/docs/swagger_contract_test.go b/docs/swagger_contract_test.go index 302d9c98..1be752cf 100644 --- a/docs/swagger_contract_test.go +++ b/docs/swagger_contract_test.go @@ -3,6 +3,7 @@ package docs_test import ( "encoding/json" "os" + "strings" "testing" docs "github.com/Tencent/WeKnora/docs" @@ -63,6 +64,55 @@ func TestKnowledgeSearchRouteContract(t *testing.T) { } } +func TestReleaseAPIContracts(t *testing.T) { + for _, tt := range swaggerDocuments() { + t.Run(tt.name, func(t *testing.T) { + var spec struct { + BasePath string `json:"basePath" yaml:"basePath"` + Paths map[string]map[string]any `json:"paths" yaml:"paths"` + Definitions map[string]struct { + Properties map[string]struct { + Type string `json:"type" yaml:"type"` + } `json:"properties" yaml:"properties"` + } `json:"definitions" yaml:"definitions"` + } + if err := tt.parse(tt.loadSpec(t), &spec); err != nil { + t.Fatal(err) + } + if spec.BasePath != "/api/v1" { + t.Fatalf("unexpected API base path %q", spec.BasePath) + } + for path := range spec.Paths { + if strings.HasPrefix(path, spec.BasePath+"/") { + t.Errorf("route %s repeats the API base path", path) + } + } + for path, methods := range map[string][]string{ + "/knowledge/{id}/spans": {"get"}, + "/knowledge-bases/{id}/images": {"get", "post"}, + "/wiki-search": {"post"}, + "/agents/tools": {"get"}, + "/system/admin/users": {"get"}, + "/system/admin/users/status": {"post"}, + "/system/admin/model-catalog": {"get", "put"}, + "/system/admin/model-catalog/preview": {"post"}, + } { + for _, method := range methods { + if _, ok := spec.Paths[path][method]; !ok { + t.Errorf("missing %s %s", method, path) + } + } + } + for _, name := range []string{"CatalogUpdate", "CatalogState", "CatalogRevision"} { + definition := "github_com_Tencent_WeKnora_internal_application_service." + name + if spec.Definitions[definition].Properties["overlay"].Type != "object" { + t.Errorf("%s.overlay must be a JSON object", name) + } + } + }) + } +} + func TestModelDeleteUsageContract(t *testing.T) { for _, tt := range swaggerDocuments() { t.Run(tt.name, func(t *testing.T) { diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 0f70a6ed..5522746b 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "knowledage-base", - "version": "0.8.2", + "version": "0.8.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "knowledage-base", - "version": "0.8.2", + "version": "0.8.3", "dependencies": { "@microsoft/fetch-event-source": "^2.0.1", "@novnc/novnc": "^1.7.0", diff --git a/frontend/package.json b/frontend/package.json index ee38c482..d0b8f196 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "knowledage-base", - "version": "0.8.2", + "version": "0.8.3", "private": true, "type": "module", "scripts": { diff --git a/helm/Chart.yaml b/helm/Chart.yaml index ea9f2c47..ebeeafb4 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -5,7 +5,7 @@ description: | with document parsing, vector search, and LLM integration. type: application version: 0.1.0 -appVersion: "v0.8.2" +appVersion: "v0.8.3" kubeVersion: ">=1.25.0-0" home: https://github.com/Tencent/WeKnora icon: https://raw.githubusercontent.com/Tencent/WeKnora/main/docs/images/logo.png diff --git a/internal/application/service/model_catalog.go b/internal/application/service/model_catalog.go index a3d06d07..9ec5a144 100644 --- a/internal/application/service/model_catalog.go +++ b/internal/application/service/model_catalog.go @@ -51,7 +51,7 @@ type CatalogProviderView struct { // CatalogRevision is one earlier published overlay. type CatalogRevision struct { Version uint64 `json:"version"` - Overlay json.RawMessage `json:"overlay"` + Overlay json.RawMessage `json:"overlay" swaggertype:"object"` UpdatedBy string `json:"updated_by"` UpdatedAt time.Time `json:"updated_at"` } @@ -62,7 +62,7 @@ type CatalogState struct { AppliedVersion uint64 `json:"applied_version"` Version uint64 `json:"version"` Baseline string `json:"baseline"` - Overlay json.RawMessage `json:"overlay"` + Overlay json.RawMessage `json:"overlay" swaggertype:"object"` History []CatalogRevision `json:"history"` Builtin []CatalogProviderView `json:"builtin"` Deployment []CatalogProviderView `json:"deployment"` @@ -74,7 +74,7 @@ type CatalogState struct { type CatalogUpdate struct { Version uint64 `json:"version"` Baseline string `json:"baseline"` - Overlay json.RawMessage `json:"overlay"` + Overlay json.RawMessage `json:"overlay" swaggertype:"object"` } // ModelCatalogService persists console overlays independently of the mounted diff --git a/internal/handler/knowledge.go b/internal/handler/knowledge.go index 857bf3d7..9ef245b3 100644 --- a/internal/handler/knowledge.go +++ b/internal/handler/knowledge.go @@ -673,7 +673,9 @@ func (h *KnowledgeHandler) GetKnowledge(c *gin.Context) { // @Param id path string true "知识ID" // @Param attempt query int false "指定尝试号;省略=最新" // @Success 200 {object} map[string]interface{} -// @Router /api/v1/knowledge/{id}/spans [get] +// @Security Bearer +// @Security ApiKeyAuth +// @Router /knowledge/{id}/spans [get] // // Always returns the canonical 5-stage timeline; missing stage rows are // synthesized as "pending" so the frontend timeline always renders five diff --git a/internal/handler/system_model_catalog.go b/internal/handler/system_model_catalog.go index 58b85eb4..a2c3f2e9 100644 --- a/internal/handler/system_model_catalog.go +++ b/internal/handler/system_model_catalog.go @@ -10,6 +10,17 @@ import ( ) // GetModelCatalog returns the catalog layers, overlay and version history. +// @Summary Get the system model catalog +// @Description System administrator JWT only; API keys are not accepted. Returns built-in, deployment and effective +// @Description catalogs, the current overlay, version/baseline tokens, and the latest 20 published revisions. +// @Tags 系统管理 +// @Produce json +// @Success 200 {object} service.CatalogState +// @Failure 401 {object} map[string]interface{} +// @Failure 403 {object} map[string]interface{} +// @Failure 503 {object} map[string]interface{} +// @Security Bearer +// @Router /system/admin/model-catalog [get] func (h *SystemHandler) GetModelCatalog(c *gin.Context) { state, err := h.modelCatalogSvc.State(c.Request.Context()) if err != nil { @@ -20,9 +31,41 @@ func (h *SystemHandler) GetModelCatalog(c *gin.Context) { } // PreviewModelCatalog validates an overlay and returns the candidate catalog. +// @Summary Preview a model catalog overlay +// @Description System administrator JWT only; API keys are not accepted. Validates the overlay without publishing +// @Description it. Supply the current version and baseline; stale values return 409. The response contains the +// @Description candidate effective catalog and normalized overlay; history, builtin and deployment are null. +// @Tags 系统管理 +// @Accept json +// @Produce json +// @Param request body service.CatalogUpdate true "Version, baseline and overlay object (max 1 MiB)" +// @Success 200 {object} service.CatalogState +// @Failure 400 {object} map[string]interface{} +// @Failure 401 {object} map[string]interface{} +// @Failure 403 {object} map[string]interface{} +// @Failure 409 {object} map[string]interface{} +// @Failure 500 {object} map[string]interface{} +// @Security Bearer +// @Router /system/admin/model-catalog/preview [post] func (h *SystemHandler) PreviewModelCatalog(c *gin.Context) { h.changeModelCatalog(c, false) } // PublishModelCatalog validates, persists and applies an overlay. +// @Summary Publish a model catalog overlay +// @Description System administrator JWT only; API keys are not accepted. Validates and publishes a new overlay +// @Description revision using the current version and baseline. Stale values return 409. To restore a historical +// @Description configuration, submit its overlay with the current version and baseline. +// @Tags 系统管理 +// @Accept json +// @Produce json +// @Param request body service.CatalogUpdate true "Version, baseline and overlay object (max 1 MiB)" +// @Success 200 {object} service.CatalogState +// @Failure 400 {object} map[string]interface{} +// @Failure 401 {object} map[string]interface{} +// @Failure 403 {object} map[string]interface{} +// @Failure 409 {object} map[string]interface{} +// @Failure 500 {object} map[string]interface{} +// @Security Bearer +// @Router /system/admin/model-catalog [put] func (h *SystemHandler) PublishModelCatalog(c *gin.Context) { h.changeModelCatalog(c, true) } func (h *SystemHandler) changeModelCatalog(c *gin.Context, publish bool) { diff --git a/website-docs/.vitepress/theme/SiteHeader.vue b/website-docs/.vitepress/theme/SiteHeader.vue index 816dae65..d6d450fd 100644 --- a/website-docs/.vitepress/theme/SiteHeader.vue +++ b/website-docs/.vitepress/theme/SiteHeader.vue @@ -12,7 +12,7 @@ const docsNavigation = [ { label: 'API', href: '/docs/04-api/01-api-overview', section: '/docs/04-api/' }, { label: '客户端', href: '/docs/05-clients/01-frontend', section: '/docs/05-clients/' }, { label: '开发', href: '/docs/06-development/01-dev-guide', section: '/docs/06-development/' }, - { label: '版本', href: '/docs/07-releases/v0.8.2', section: '/docs/07-releases/' }, + { label: '版本', href: '/docs/07-releases/v0.8.3', section: '/docs/07-releases/' }, ] const open = ref(false) watch(() => route.path, () => open.value = false) diff --git a/website-docs/01-getting-started/01-introduction.md b/website-docs/01-getting-started/01-introduction.md index f6e99b18..46099b49 100644 --- a/website-docs/01-getting-started/01-introduction.md +++ b/website-docs/01-getting-started/01-introduction.md @@ -113,7 +113,7 @@ flowchart TB - **检索**:向量 + BM25 混合检索、RRF 融合、Rerank 重排、查询改写与扩展、意图识别(greeting/chitchat/web_search 等,见 `config/prompt_templates/intent_prompts.yaml`)。 - **问答与 Agent**:流式 SSE 问答、多轮上下文压缩、引用溯源;ReAct Agent(工具:`search_knowledge`、`read_document`、`list_documents`、`wiki_search`、`data_analysis` 等)、MCP 外部工具、Agent Skills(Docker、Cube 或 E2B 沙箱执行脚本)、Web 搜索。 - **对话体验**:回答进行中追加要求、从任意历史提问分叉或原地回滚(带沙箱工作区检查点)、按会话调整思考强度,「产物」页跨会话汇总智能体生成的文件,详见[会话体验](../03-features/18-chat-experience.md)。 -- **多租户与安全**:RBAC 角色鉴权(默认开启,`WEKNORA_TENANT_ENABLE_RBAC`)、审计日志(默认保留 90 天)、邀请制注册(`auth.registration_mode=invite_only`,也可用旧变量 `DISABLE_REGISTRATION=true`)、OIDC 单点登录、SSRF 防护(可选仅白名单出站 `SSRF_DNS_WHITELIST_ONLY`)、敏感字段 AES-256 加密。界面提供简体中文、英文、日文、韩文和俄文。 +- **多租户与安全**:RBAC 角色鉴权(默认开启,`WEKNORA_TENANT_ENABLE_RBAC`)、审计日志(默认保留 90 天)、三档注册模式(开放注册、`invite_register` 仅限邀请注册、`invite_only` 禁止注册;旧变量 `DISABLE_REGISTRATION=true` 对应禁止注册)、OIDC 单点登录、SSRF 防护(可选仅白名单出站 `SSRF_DNS_WHITELIST_ONLY`)、敏感字段 AES-256 加密。界面提供简体中文、繁体中文、英文、日文、韩文和俄文。 - **可观测性**:Langfuse 全链路追踪(LLM/Embedding/Rerank/VLM/ASR 调用与 token 统计)、健康检查、Swagger API 文档(`GIN_MODE=debug` 时)。 - **生态**:REST API(`/api/v1`)+ API Key、内置 MCP Server(按空间创建端点,把 WeKnora 作为工具暴露给其他 Agent,见[MCP 集成](../03-features/08-mcp.md))、CLI(`cli/`)、微信小程序(`miniprogram/`)、浏览器插件渠道、[本机浏览器](../05-clients/09-local-browser.md)(智能体通过 Chrome/Edge 扩展操作用户浏览器)。Lite 桌面版(macOS)可在本机沙箱中执行智能体命令。 diff --git a/website-docs/01-getting-started/02-installation.md b/website-docs/01-getting-started/02-installation.md index a05182c6..beb91ad3 100644 --- a/website-docs/01-getting-started/02-installation.md +++ b/website-docs/01-getting-started/02-installation.md @@ -74,7 +74,7 @@ docker compose ps # 等所有服务变成 healthy/running > 如果数据库仍为 ParadeDB `v0.22.2-pg17`,先按 [ParadeDB 升级说明](06-paradedb-upgrade.md) 停止写入、备份、保留数据卷更换镜像并完成 `pg_search` 扩展升级,再恢复应用。仅替换镜像不会更新已有数据库的扩展 SQL;迁移 `000099` 会处理 WeKnora 库中符合条件的 `0.22.2–0.22.5`,其他数据库仍需单独检查。 ```bash -# 在 .env 中将 WEKNORA_VERSION 设为目标版本(如 0.7.0),或保持 latest +# 在 .env 中将 WEKNORA_VERSION 设为目标版本(如 0.8.3),或保持 latest docker compose pull docker compose up -d ``` @@ -190,7 +190,7 @@ PLAYWRIGHT_WEBKIT_DOWNLOAD_HOST=https://your-playwright-mirror.example.com \ ## 六、Helm 部署(helm/) -`helm/Chart.yaml`:apiVersion v2,chart 名 `weknora`,appVersion 跟随版本(如 v0.8.2),要求 Kubernetes >= 1.25.0。 +`helm/Chart.yaml`:apiVersion v2,chart 名 `weknora`,appVersion 跟随版本(如 v0.8.3),要求 Kubernetes >= 1.25.0。 Chart 内包含五个组件:`app`(`wechatopenai/weknora-app`)、`frontend`(`wechatopenai/weknora-ui`)、`docreader`、`postgresql`(ParadeDB 镜像,chart 默认 `paradedb/paradedb:v0.18.9-pg17`,与 Compose 的版本不同)、`redis`(`redis:7-alpine`),并可选启用 `minio` 与 `neo4j`。 diff --git a/website-docs/01-getting-started/03-quickstart.md b/website-docs/01-getting-started/03-quickstart.md index 73211b9d..3939074d 100644 --- a/website-docs/01-getting-started/03-quickstart.md +++ b/website-docs/01-getting-started/03-quickstart.md @@ -22,7 +22,7 @@ 注册要求与部署差异: - 用户名 2–50 个字符;密码为 8–32 位,至少包含字母和数字。启用复杂密码策略后,还须同时包含大小写字母和特殊字符,界面与 API 使用同一策略; -- 团队部署可关闭公开注册,之后通过邀请链接添加成员。可设置 `DISABLE_REGISTRATION=true`(启动时把注册模式强制为 `invite_only`),或由系统管理员在「设置 → 系统」将 `auth.registration_mode` 改成 `invite_only`(立即生效,不用重启); +- 团队部署需要通过邀请链接让新成员注册时,由系统管理员在「设置 → 系统设置」把 `auth.registration_mode` 设为 `invite_register`(立即生效)。`invite_only` / `DISABLE_REGISTRATION=true` 表示禁止密码注册,邀请也不能创建新账号,只允许已有账号登录后加入; - 如果部署把默认空间策略设成了 `tenantless`(`auth.default_tenant_mode`),注册后**不会**自动建空间,而是被引导到 `/onboarding/workspace`,需要先自建或接受邀请加入一个空间才能继续; - 桌面应用免注册,启动即自动创建本地账号并登录;Lite 单二进制在浏览器中访问时仍需注册和登录。 diff --git a/website-docs/01-getting-started/04-configuration.md b/website-docs/01-getting-started/04-configuration.md index 6780be47..19487738 100644 --- a/website-docs/01-getting-started/04-configuration.md +++ b/website-docs/01-getting-started/04-configuration.md @@ -119,7 +119,7 @@ flowchart LR | 段 | 结构体 | 关键字段与默认值 | | --- | --- | --- | -| `auth` | `AuthConfig` | `registration_mode`:`self_serve`(默认)/ `invite_only`(`DISABLE_REGISTRATION=true` 时强制);`default_tenant_mode`:`create_personal`(默认)/ `tenantless` | +| `auth` | `AuthConfig` | `registration_mode`:`self_serve`(默认,开放注册)/ `invite_register`(仅限邀请注册)/ `invite_only`(禁止注册,`DISABLE_REGISTRATION=true` 时使用);`default_tenant_mode`:`create_personal`(默认)/ `tenantless` | | `audit` | `AuditConfig` | `retention_days`:审计日志保留天数,段落省略时默认 90;0 禁用清理;<0 校验报错(env `WEKNORA_AUDIT_RETENTION_DAYS`) | | `oidc_auth` | `OIDCAuthConfig` | `enable`、`issuer_url`、`jwks_uri`、`discovery_url`(缺省由 issuer 拼 `/.well-known/openid-configuration`)、`client_id`、`client_secret`、`authorization_endpoint`、`token_endpoint`、`user_info_endpoint`、`scopes`(默认 `openid profile email`)、`user_info_mapping.username`(默认 `name`)/`email`(默认 `email`);全部可用 `OIDC_AUTH_*` 环境变量覆盖 | | `agent` | `AgentConfig` | `llm_call_timeout`:单次 LLM 调用超时秒数(默认 120,env `WEKNORA_AGENT_LLM_TIMEOUT`);`tool_approval_timeout_seconds`:MCP 工具人工审批等待(默认 600,env `WEKNORA_AGENT_TOOL_APPROVAL_TIMEOUT`) | @@ -225,7 +225,7 @@ AWS S3 的 `S3_ACCESS_KEY` / `S3_SECRET_KEY` 可以**同时留空**,此时走 | `JWT_SECRET` | 空 | JWT 签名密钥(必填,可用 `openssl rand -hex 32` 生成)。留空或使用示例值时每次启动随机生成,重启后已登录用户需重新登录;多副本必须配置相同的值 | | `SYSTEM_AES_KEY` | 空 | 敏感字段落盘加密的 AES-256 主密钥,**必须 32 字节**(可用 `openssl rand -hex 16` 生成);丢失则已加密数据(租户 API Key、模型 key、向量库凭证等)不可恢复,升级时沿用原值。v0.4.0 起取代 `TENANT_AES_KEY`/`CRYPTO_MASTER_KEY`/`CRYPTO_SALT` | | `SYSTEM_SIGNING_KEY` | 空(回退到 `SYSTEM_AES_KEY`) | 嵌入会话与预签名文件链接的签名密钥(可用 `openssl rand -hex 32` 生成)。未设置时使用 `SYSTEM_AES_KEY`;两者都缺失、长度不足 16 或为示例值时无法签发签名链接与嵌入会话。更换后已签发的链接失效;多副本须使用同一个值 | -| `DISABLE_REGISTRATION` | false | true 时强制 `registration_mode=invite_only` | +| `DISABLE_REGISTRATION` | false | true 时启动配置使用 `invite_only`(禁止密码注册,包括邀请注册);数据库运行时设置仍优先 | | `WEKNORA_AUTH_DEFAULT_TENANT_MODE` | create_personal | 注册后建空间策略(`create_personal` / `tenantless`) | | `WEKNORA_TENANT_ENABLE_RBAC` | (默认 true) | 空间角色强制鉴权开关 | | `WEKNORA_TENANT_ENABLE_CROSS_TENANT_ACCESS` | false | 跨空间访问 | @@ -282,6 +282,13 @@ AWS S3 的 `S3_ACCESS_KEY` / `S3_SECRET_KEY` 可以**同时留空**,此时走 | 其余 `DOCREADER_PDF_*`(词距/边栏/隐藏文本/嵌入图/图表区等 20+ 项) | 见 `docker-compose.yml` docreader 段注释 | PDF 版式与抽取精调 | | `DOCREADER_EXTERNAL_HTTP_PROXY` / `_HTTPS_PROXY` | 空 | docreader 出站抓取代理 | +### 描述生成与出站连接 + +| 环境变量 | 默认 | 作用 | +| --- | --- | --- | +| `KNOWLEDGE_BASE_PROFILE_MAX_TOKENS` | 2048 | 知识库描述生成的补全 token 预算;无效或非正值回退默认,推理模型出现 `no gist` 时可调大 | +| `WEKNORA_OUTBOUND_DIAL_TIMEOUT` | 5s | SSRF 安全出站连接的拨号超时,使用 Go duration(如 `10s`);不是整个请求或模型生成的总超时 | + ### Agent、Skills 与附件 | 名称 | 默认值 | 说明 | @@ -290,7 +297,7 @@ AWS S3 的 `S3_ACCESS_KEY` / `S3_SECRET_KEY` 可以**同时留空**,此时走 | `WEKNORA_SANDBOX_DOCKER_ENABLED` | false | Docker 沙箱后端回退开关。系统管理员也可在「设置 → 系统设置 → 网络安全」打开(DB 优先,立即生效)。默认关闭,因为本机 `docker.sock` 等同宿主机 root | | `WEKNORA_AGENT_LLM_TIMEOUT` | 120s | Agent 单次 LLM 调用超时(Go duration 或纯数字秒) | | `WEKNORA_AGENT_TOOL_APPROVAL_TIMEOUT` / `_FAIL_OPEN` | 600s / fail-close | MCP 工具人工审批等待与失败策略 | -| `WEKNORA_CHAT_ATTACHMENT_TTL_HOURS` / `_WAIT_TIMEOUT_SEC` / `_OCR_CONCURRENCY` / `_OCR_MAX_PAGES` | 24 / 60 / 8 / 8 | 聊天附件解析保留时长、等待超时与 OCR 并发/页数上限 | +| `WEKNORA_CHAT_ATTACHMENT_TTL_HOURS` / `_WAIT_TIMEOUT_SEC` / `_OCR_CONCURRENCY` / `_OCR_MAX_PAGES` | 24 / 60 / 8 / 8 | 未被有效会话消息引用的附件保留时长、读取解析等待超时与 OCR 并发/页数上限;已发送附件在原会话或分叉会话仍引用时不因 TTL 清理 | | `WEKNORA_HOUSEKEEPING_ENABLED` | 启用 | 回收卡在 processing 的脏数据 | | `WEKNORA_DOCUMENT_PROCESS_TIMEOUT` / `WEKNORA_DOCREADER_CALL_TIMEOUT` | 2h / 30m | 文档处理任务与单次 RPC 超时 | | `WEKNORA_PADDLEOCR_VL_TIMEOUT` | 1000s | 自建 PaddleOCR-VL HTTP 请求超时,支持正数 Go duration(如 `5400s`、`90m`);空值、无效值或非正数使用默认值。外层超时需留余量,例如本项 `90m`、DocReader `100m`、文档任务 `2h` | diff --git a/website-docs/03-features/02-knowledge-base.md b/website-docs/03-features/02-knowledge-base.md index 9af89e39..b2735ec7 100644 --- a/website-docs/03-features/02-knowledge-base.md +++ b/website-docs/03-features/02-knowledge-base.md @@ -54,6 +54,24 @@ caption="解析时间线:各阶段耗时、失败原因与卡住提示" hint="展示文档解析时间线抽屉:阶段瀑布图(文档解析/分块/向量化/多模态/后处理)、失败时的错误卡片(阶段名、错误码、后端原因与重试按钮),以及「已 N 分钟没有进展」的提示条和停止解析按钮。" /> +## 浏览画廊 {#image-gallery} + +文档知识库的「画廊」页签汇总从文档提取的图片,以瀑布流持续加载。可搜索图片描述和 OCR 文字,按系统提供的图片属性、来源文档等筛选;点击图片可查看大图、描述、OCR 与来源。来源文档筛选支持多选,便于核对某批文件的解析结果。 + +画廊展示已有图片资源,不要求开启图片向量检索。 + + + + + +## 多模态 Embedding 与图片检索 {#multimodal-embedding} + +支持图片输入的 Embedding 模型将文本与原图编码到同一向量空间,使文字问题能够召回相关图片。已支持的模型包括腾讯 WeMM-Embedding、Qwen3-VL-Embedding 等,接入时需匹配图片输入能力与请求协议;WeMM 的服务部署与接入见[模型配置](06-models.md#wemm-embedding)。 + +在知识库设置中开启多模态处理和「图片向量检索」,并选用支持图片输入的向量模型。图片向量默认关闭,已有文档需要重新解析才会补建图片向量,扫描 PDF 页不生成图片向量。详细参数与限制见下文「图片向量」。 + + + ## 整理文件夹与标签 文件夹用于按目录归档,一篇文档只属于一个文件夹。上传整个目录可保留层级结构;在文件夹树中重命名或移动时,子目录路径会一并更新,目标目录已存在时合并内容。文档在同一知识库内移动文件夹只调整归类,不重新解析。 @@ -206,7 +224,7 @@ OCR 决策是代码纯函数 `DecideOCR`(`internal/application/service/image_a - 策略读取到的属性**缺键**(模型漏答该行,或答了非法取值)→ 按 `on_unobserved` 兜底(默认仍 OCR); - 全部属性都被观察到、且都不命中 → 跳过 OCR。 -模型答非所问 / 属性缺失一律按兜底策略处理,观察失误只多花一次调用、不会丢内容。注意**属性缺键是正常结果**:观察失败时不会写入保守默认值(schema 版本 `attrs/2`),因此 `image_attrs` 可能为空对象,读取方需区分「未观察到」与「观察到了负值」。 +模型答非所问或属性缺失时按 `on_unobserved` 策略处理,默认继续 OCR;若将其设为 `false`,未观察到属性的图片也会跳过 OCR。完整的负值观察结果可能使 OCR 被跳过,因此仍需抽查模型判断与文字提取结果。注意**属性缺键是正常结果**:观察失败时不会写入保守默认值(schema 版本 `attrs/2`),因此 `image_attrs` 可能为空对象,读取方需区分「未观察到」与「观察到了负值」。 管线与观察结果记录在每张图的处理轨迹子 span 上,便于核对与排查:input `pipeline` = `observation_driven`(本开关开启)或 `caption_ocr`(关闭,历史行为);output `attr_policy`(本轮 OCR 决策)、`image_attrs`(观察到的属性)、`ocr_skipped`(`attr_policy`=被策略跳过 / `disabled`=OCR 总开关关闭)、`observation_failed`(未形成有效观察)、`chunks_created`。 diff --git a/website-docs/03-features/05-retrieval-engines.md b/website-docs/03-features/05-retrieval-engines.md index da8b5d62..d544bc48 100644 --- a/website-docs/03-features/05-retrieval-engines.md +++ b/website-docs/03-features/05-retrieval-engines.md @@ -13,6 +13,12 @@ 切换引擎需要重建索引。知识库绑定的向量存储在创建后不可修改,应在建库前确定实例。 +## 多模态 Embedding 与图片召回 + +支持图片输入的向量模型可将文本和图片编码到同一空间。知识库默认不开启图片向量,需要同时配置多模态与「图片向量检索」;已有文档需重新解析,扫描 PDF 页不生成图片向量。画廊只展示已有图片,不依赖此开关。详情见[知识库图片配置](02-knowledge-base.md#multimodal-embedding)。 + +命中图片可交给支持图片输入的重排模型评估,视觉对话模型能直接看到保留的命中原图;纯文本模型使用描述等文本信息。原图向量与描述/OCR 文本索引分别管理,关闭开关停止图片向量召回,不自动删除已有向量。 + ## 能力矩阵与选型对比 {#_3-能力矩阵与选型对比} | 引擎 | RETRIEVE_DRIVER 值 | 向量检索 | 关键词/全文 | 关键词打分 | 中文分词 | 维度管理 | 阈值下推 | 部署复杂度 | 适用场景 | diff --git a/website-docs/03-features/06-models.md b/website-docs/03-features/06-models.md index 68cd82a2..89633da8 100644 --- a/website-docs/03-features/06-models.md +++ b/website-docs/03-features/06-models.md @@ -119,9 +119,9 @@ vllm serve "$MODEL_PATH" \ 4B、9B 分别替换模型路径与服务名称。在 WeKnora 中选择「自定义」厂商,Base URL 填写服务的 `http://主机:端口/v1`,选择对应向量模型,初次接入保持「自定义输出维度」关闭。若服务没有设置 `--served-model-name`,模型名称须填写服务实际返回的本地路径;短名称 `WeMM-Embedding-2B` 及以 `/WeMM-Embedding-2B` 结尾的路径也能识别预设,4B、9B 同理。任意自定义别名需要另行配置模型能力和协议覆盖。 -预设让文本和图片都通过 `messages` 进入模型模板,由模板追加取向量所需的 `` 标记;启用 `batch_messages`,将同一批内的独立 conversations 合并请求,每条仍返回各自的向量。图片批量调用最多每批 5 张,超出自动拆分;这是 WeKnora 选择的批量大小,与现有 Qwen3-VL 预设一致,不代表模型或 vLLM 的官方上限,可用 `max_image_batch_size` 按服务承载能力调整。当前知识库图片索引任务仍逐张调用,不会因该配置自动合并多个任务。不发送历史默认的 `truncate_prompt_tokens: 511`;超出服务上下文上限时由服务报错,不会静默截断。无需额外填写兼容 JSON 或图片提示词。若此前用普通文本 `input` 为该模型建立过索引,需要重建向量。 +预设让文本和图片都通过 `messages` 进入模型模板,由模板追加取向量所需的 `` 标记;启用 `batch_messages`,将同一批内的独立 conversations 合并请求,每条仍返回各自的向量。图片批量调用最多每批 5 张,超出自动拆分;这是 WeKnora 选择的批量大小,与现有 Qwen3-VL-Embedding 预设一致,不代表模型或 vLLM 的官方上限,可用 `max_image_batch_size` 按服务承载能力调整。当前知识库图片索引任务仍逐张调用,不会因该配置自动合并多个任务。不发送历史默认的 `truncate_prompt_tokens: 511`;超出服务上下文上限时由服务报错,不会静默截断。无需额外填写兼容 JSON 或图片提示词。若此前用普通文本 `input` 为该模型建立过索引,需要重建向量。 -WeMM 的模板已经包含所需特殊 token,保留 vLLM 的 `add_special_tokens: false`、`add_generation_prompt: false` 默认行为,不要照搬 Qwen3-VL 预设的 `add_special_tokens: true`。vLLM 的 Embedding 默认使用末尾 token 并做 L2 归一化,无需额外发送 `normalize` 或关闭 `use_activation`。 +WeMM 的模板已经包含所需特殊 token,保留 vLLM 的 `add_special_tokens: false`、`add_generation_prompt: false` 默认行为,不要照搬 Qwen3-VL-Embedding 预设的 `add_special_tokens: true`。vLLM 的 Embedding 默认使用末尾 token 并做 L2 归一化,无需额外发送 `normalize` 或关闭 `use_activation`。 需要降维时,开启「自定义输出维度」并选择模型配置中的合法维度,WeKnora 会给文本和图片请求发送相同的 `dimensions`;vLLM 会先截取对应维度,再归一化: @@ -281,7 +281,7 @@ WeMM 的模板已经包含所需特殊 token,保留 vLLM 的 `add_special_toke ## 内置厂商 -内置 29 个厂商,另可通过 Ollama 接入本地模型。各厂商支持的模型类型如下(✓ 表示支持): +内置 30 个厂商,另可通过 Ollama 接入本地模型。各厂商支持的模型类型如下(✓ 表示支持): | 厂商 | ID | 对话 | 向量 | 重排 | 视觉 | 语音 | | --- | --- | :-: | :-: | :-: | :-: | :-: | @@ -556,7 +556,7 @@ builtin_models: | 层 | 位置 | 职责 | |----|------|------| -| 协议层 | `internal/models/api/` | 一个 wire 协议一个包。对话:`openaicompletions`、`openairesponses`、`anthropicmessages`、`googlegenai`;重排:`cohererank`、`dashscoperank`、`nimrerank`、`tencentlkeap`、`volcengineknowledge`;向量:`openaiembeddings`、`dashscopeembeddings`、`arkembeddings`、`googleembeddings`;语音:`openaitranscriptions`、`openaichataudio`。各自持有请求/响应结构与解析,不依赖厂商定义或模型目录 | +| 协议层 | `internal/models/api/` | 一个 wire 协议一个包。对话:`openaicompletions`、`openairesponses`、`anthropicmessages`、`googlegenai`;重排:`cohererank`、`dashscoperank`、`nimrerank`、`tencentlkeap`、`volcengineknowledge`、`teirank`、`pineconerank`;向量:`openaiembeddings`、`dashscopeembeddings`、`arkembeddings`、`googleembeddings`;语音:`openaitranscriptions`、`openaichataudio`。各自持有请求/响应结构与解析,不依赖厂商定义或模型目录 | | 厂商层 | `internal/models/providers/.go` | 一个厂商一份定义,声明支持的模型类型、各类型默认地址、鉴权方式、额外字段、协议兼容默认值与特殊端点钩子;图标放 `providers/assets/`,在 `builtin.go` 的 `Builtins()` 显式列出 | | 目录层 | `internal/models/catalog` | 加载生成的模型目录 `catalog/data/models.generated.json`,按类型和模型名查询条目;不含厂商行为 | | 运行时 | `internal/models/runtime` | 组合厂商定义与目录、应用部署叠加(`overlay.go`),合并单个模型配置、选择协议、组装认证和端点,隔离旧字段推断 | diff --git a/website-docs/03-features/07-agent.md b/website-docs/03-features/07-agent.md index f72cb087..f9ddabb8 100644 --- a/website-docs/03-features/07-agent.md +++ b/website-docs/03-features/07-agent.md @@ -59,7 +59,7 @@ MCP 服务需要 OAuth 授权时,可在当前对话中完成授权,成功后 ## 使用技能、附件和记忆 -绑定沙箱后,智能推理可读取附件、运行脚本并生成文件。可下载的产物应写入 `/workspace/output`,回答完成后可在会话中预览和下载。每轮回答结束后,系统为 `/workspace` 记录一个 git 检查点,分叉和回滚会话时据此恢复对应轮次的工作区;桌面版直接使用本机目录的会话不记录检查点,分叉和回滚只作用于对话。安装与变量配置见[技能目录与沙箱](22-skills-sandbox.md),附件操作见[会话与对话体验](18-chat-experience.md)。 +智能推理无需沙箱即可按需读取会话附件;绑定沙箱后还可以运行脚本并生成文件。可下载的产物应写入 `/workspace/output`,回答完成后可在会话中预览和下载。每轮回答结束后,系统为 `/workspace` 记录一个 git 检查点,分叉和回滚会话时据此恢复对应轮次的工作区;桌面版直接使用本机目录的会话不记录检查点,分叉和回滚只作用于对话。安装与变量配置见[技能目录与沙箱](22-skills-sandbox.md),附件操作见[会话与对话体验](18-chat-experience.md)。 长期记忆按空间和调用者隔离,智能体可单独关闭记忆读写;完整说明见[跨会话长期记忆](23-memory.md)。 @@ -99,7 +99,7 @@ smart-reasoning 下还可选**类型预设**(`Config.AgentType`,定义在 `c | 模型 | `model_id`、`rerank_model_id`、`temperature`、`max_completion_tokens`、`thinking`、`reasoning_effort`、`citation_enabled` | temperature<0 → 0.7;max_completion_tokens=0 使用运行时默认:quick-answer 2048、smart-reasoning 4096、绑定沙箱的 smart-reasoning 24576;绑定沙箱时显式值低于 8192 按 8192 执行;`reasoning_effort` 取 `off`/`auto`/`minimal`/`low`/`medium`/`high`/`xhigh`/`max`,设置后优先于 `thinking`(`thinking: true` 等同 `auto`),模型不支持的档位在调用时自动就近调整;两者都未设时不开启思考;单次对话可用请求字段 `reasoning_effort` 临时覆盖;citation 未设时视为 true | | Agent | `max_iterations` | 默认 10,负数表示不限轮数(服务层上限 100) | | Agent | `llm_call_timeout` | 单次模型流式调用允许连续无输出的秒数,0 用默认 120s;总时长由模型传输层控制 | -| Agent | `allowed_tools` | 工具白名单;空回退 DefaultAllowedTools | +| Agent | `allowed_tools` | 工具白名单;未设置/null 回退 DefaultAllowedTools,显式 `[]` 不选内置工具 | | MCP | `mcp_selection_mode`(all/selected/none)、`mcp_services`、`mcp_auth_wait_timeout` | OAuth 等待秒数 <=0 用 Gate 默认 | | 技能 | `skills_selection_mode`(all/selected/none)、`selected_skills`、`sandbox_config_id` | 选择空间沙箱及其已安装技能,见[技能目录与沙箱](22-skills-sandbox.md) | | 记忆 | `memory_enabled` | nil 继承空间,false 禁用本智能体的记忆读写 | @@ -419,7 +419,7 @@ flowchart TD | `data_analysis` | `knowledge_id`\*、`sql`\* | 把 CSV/Excel 载入 DuckDB 后执行 SQL。文档由 `knowledge_id` 选定,SQL 中固定以表名 `dataset` 引用它(每次查询在独立连接上建临时视图映射到物理表,模型永远不需要在 SQL 里写文档 ID);多 Sheet Excel 合并为一张表并暴露 `__sheet_name` 列;自动纠正列名大小写/空格差异;会话结束 Cleanup 时 DROP 所建表 | | `web_search` | `query`\*,可选 `count`(不超过配置上限,最多 20)、`country`(两位国家码或 `ALL`)、`freshness`(`pd`/`pw`/`pm`/`py`,Brave 另支持日期区间)、`content` | 联网搜索,直接返回提供商的标题、摘要和 `wN` 页面短 ID;按任务需要选择知识库或联网检索,Agent 搜索不再自动进行 RAG 压缩;`country`/`freshness` 仅 Brave 与 Serply 支持,其他提供商传入时报错;`content=true` 在 15 秒内并行抓取前 3 条结果、各取 5000 字符正文摘录 | | `web_fetch` | `items[]`\*(每项 `url`\*=`wN` 或 HTTP(S) URL,可选 `offset`、`limit`;`limit` 按字符计,默认且最多 8000,多项共享输出预算) | 并发抓取最多 8 个网页(SSRF 安全客户端 + DNS pinning,必要时 chromedp 渲染),直接返回 Markdown 或支持的文本正文;60s 超时。按字符分页,使用 `next_offset` 续读;完整正文保存在 `full_output_path`(`web://` 地址,仅同一会话可读),可用 `read_file` 跨轮按行读取;逐 URL 返回 `success`/`failed`/`skipped` 状态与可重试错误码(如快照已过期的 `snapshot_expired`),部分失败不影响其它页面 | -| `read_file` | `path`\*、`offset`(从 1 开始的行号)、`limit`(默认 2000 行)、`max_bytes`(上限 64 KiB,网页快照 50 KiB);网页可带 `line_offset` | 读取工作区文本、skill:// 资源和 web:// 网页快照,按结果续读 | +| `read_file` | `path`\*、`offset`(从 1 开始的行号)、`limit`(默认 2000 行)、`max_bytes`(上限 64 KiB,网页快照 50 KiB);网页可带 `line_offset` | 读取工作区文本、skill:// 资源、web:// 网页快照及 attachment:// 会话附件,按结果续读;附件支持按需阅读、等待后台解析及指定图片读取,见[会话体验](18-chat-experience.md#使用临时附件提问) | | `shell_exec` | `command`\*;可选 `skill_name`、`work_dir`、`timeout_sec`、`stdin`(≤ 64 KiB)、`max_output_bytes`(默认 16 KiB,上限 64 KiB)、`max_stderr_bytes`(默认 8 KiB,上限 16 KiB)、`env` | 在当前会话沙箱运行命令,默认工作目录 `/workspace`;指定技能时解析技能目录和变量 | | `list_sandbox_files` | `path`、`max_entries`(默认 200,上限 500) | 浏览沙箱文件和可用产物;仅在未注册 `shell_exec` 时提供 | | `write_sandbox_file` | `path`\*、`content`\*、`mode`(`overwrite` 默认 / `append`) | 写入或追加工作区文件,不能写 `/workspace/input` | @@ -442,6 +442,8 @@ flowchart TD 默认工具白名单 `DefaultAllowedTools()`(Agent 未配置 `allowed_tools` 时的回退):`search_knowledge`、`read_document`、`list_documents`、`search_conversations`。`web_search` / `web_fetch` 与 `search_memory` 不由白名单决定:注册时先从白名单中剔除,再分别按联网开关、记忆开关(空间、用户、智能体三方都允许)注入。 +**显式空工具列表**:`allowed_tools: []` 表示不选内置工具;未设置或 `null` 才使用默认列表。联网、记忆、MCP、沙箱及会话附件仍按各自开关和能力注册。v0.8.3 的迁移 `000116`(SQLite `000035`)会把旧智能推理配置中的空列表写成原默认工具,保留其行为。编辑器从 `GET /agents/tools` 获取工具目录和能力要求;新加入未知工具名会返回 400,历史未知项保留并返回警告,受其他开关管理的工具名从白名单移除。 + **旧工具名的兼容**:`knowledge_search`、`grep_chunks` 已合并为 `search_knowledge`;`list_knowledge_chunks`、`get_document_info`、`wiki_read_source_doc` 已合并为 `read_document`。`definitions.go` 的 `legacyToolSuccessors` 记录这组映射,`NormalizeAllowedTools` 在注册工具时把已保存 Agent 配置、预设与 API 调用里的旧名字自动改写为新工具,无需数据迁移;历史消息中记录的旧工具名仍能正常渲染。 **文档阅读工具的可用范围**:`read_document`、`list_documents` 读取的是落库的分块,所有知识库无论索引策略都会写入分块,因此只要作用域内有向量/关键词库或 Wiki 库就会注册(`agent_service.go` 的 `documentToolSet`),供 Wiki 智能体回读原文;`search_knowledge` 仍要求向量或关键词索引。能力表里这两个工具标为 `Auxiliary`:它们能用于仅 Wiki 的库,但不会把仅 Wiki 的库拉进 RAG 智能体「全部知识库」的范围,派生 KB 过滤器时只有在没有其他知识库工具时才计入。`list_documents` 的 @文件 / @标签 范围在分页之前生效:标签下推到数据库过滤条件,指定文档直接按 ID 读取,`total_docs` 与 `next_page` 只统计范围内的文档。 @@ -487,11 +489,11 @@ var ToolCapabilityRequirements = map[string]ToolRequirement{ **运行时启停逻辑**(`agent_service.go` 的 `registerTools`): -1. 起点是 `config.AllowedTools`(用户可编辑的白名单,preset 只做初始填充),先经 `NormalizeAllowedTools` 把旧工具名改写为新名;为空回退 `DefaultAllowedTools()`;共享智能体的只读调用、或作用域内没有可写 Wiki 库时,移除 Wiki 写工具(`wiki_write_page`、`wiki_replace_text`、`wiki_rename_page`、`wiki_delete_page`、`wiki_flag_issue`、`wiki_update_issue`); +1. 起点是 `config.AllowedTools`(用户可编辑的白名单,preset 只做初始填充),经 `EffectiveAllowedTools` 解析:未设置/null 回退 `DefaultAllowedTools()`,显式空数组不回退;旧工具名自动映射;共享智能体的只读调用、或作用域内没有可写 Wiki 库时,移除 Wiki 写工具(`wiki_write_page`、`wiki_replace_text`、`wiki_rename_page`、`wiki_delete_page`、`wiki_flag_issue`、`wiki_update_issue`); 2. 若本轮**没有任何知识检索 scope**(Pure Agent 模式),过滤掉全部 KB/Wiki/数据工具;若同时未开 Web 搜索,连 `todo_write` 也一并去掉; 3. 按运行时开关注入:开启联网搜索时追加 `web_search` + `web_fetch`,记忆可用时追加 `search_memory`(白名单里写了也会先剔除); 4. **硬安全网**:扫描 `SearchTargets` 中各 KB 的真实能力——没有 wiki KB 就丢弃全部 wiki 工具;没有 vector/keyword KB 就丢弃 `search_knowledge`、`query_knowledge_graph`、`database_query`,此时若也没有 wiki KB 还会丢弃 `read_document`、`list_documents`;没有启用图谱的 KB 就丢弃 `query_knowledge_graph`(防止配置陈旧:先勾了 wiki 工具、后换成非 wiki KB); -5. 去重后逐个实例化并注册;MCP 工具按 `MCPSelectionMode`(all/selected/none)另行注册;沙箱 shell/文件工具按会话能力注册(有 `shell_exec` 时不再注册 `list_sandbox_files`),`read_file` 再叠加技能和网页数据源;`local_browser` 与技能安装器的文件工具走各自的注册条件;旧技能工具名仅作兼容识别,不再注册。 +5. 去重后逐个实例化并注册;MCP 工具按 `MCPSelectionMode`(all/selected/none)另行注册;沙箱 shell/文件工具按会话能力注册(有 `shell_exec` 时不再注册 `list_sandbox_files`),`read_file` 再叠加技能、网页和会话附件数据源(附件读取不要求沙箱);`local_browser` 与技能安装器的文件工具走各自的注册条件;旧技能工具名仅作兼容识别,不再注册。 ### 记忆与上下文压缩 {#_4-记忆与上下文压缩} diff --git a/website-docs/03-features/08-mcp.md b/website-docs/03-features/08-mcp.md index c59a5862..e055d52f 100644 --- a/website-docs/03-features/08-mcp.md +++ b/website-docs/03-features/08-mcp.md @@ -29,6 +29,8 @@ MCP 管理页支持按服务名称和卡片显示的用途说明搜索。搜索 模型先读取服务的使用说明,再按需加载具体工具,所以使用说明直接影响 Agent 能否选对服务。OAuth 服务按调用者分别授权。工具需要审批时,在对话中检查参数并确认;单独停用某个工具后,运行时不会执行该工具。WeKnora 的 MCP 客户端不支持 stdio 传输。 +工具人工审批通过后,如果 OAuth 尚未授权或已经失效,对话会继续给出 OAuth 授权入口;工具审批与第三方授权是两个独立步骤。无需浏览器的调用者可使用 JWT Bearer 断言换取自身主体的 token,前提是上游支持该授权方式,详见 [OAuth API](../04-api/02-api-agent-mcp.md)。 + ## 供外部客户端调用 在「设置 → 发布集成 → MCP Server」新建端点:填写名称、选择可访问的知识库(留空为全部)、勾选要暴露的工具,并按需指定 `ask` 使用的默认 Agent(留空时使用内置快速问答)和每分钟调用上限(默认 60 次)。创建后会一次性展示令牌和地址 `/mcp/`,页面同时给出 Cursor / VS Code / Claude Desktop 的 `mcpServers` 配置、Claude Code 的一行命令,以及仅支持 stdio 的客户端通过 `mcp-remote` 桥接的写法。 @@ -276,7 +278,7 @@ sequenceDiagram - **发现与动态注册**(`internal/mcp/oauth_manager.go`):`StartAuthorization` 先构造 `transport.OAuthHandler`(`AuthServerMetadataURL` 为空时由 mcp-go 依据 MCP URL 自动发现授权服务器);服务配置了预注册客户端(`auth_config.client_id`)时直接使用它,否则若 `mcp_oauth_clients` 表中该 `(tenant, service)` 尚无客户端,调用 `h.RegisterClient(ctx, "WeKnora")` 做一次性 RFC 7591 注册并 `SaveClient` 持久化,之后所有用户复用同一 client_id。 - **PKCE**:`transport.GenerateCodeVerifier()` / `GenerateCodeChallenge()` / `GenerateState()`;`code_verifier` 是秘密,**只存服务端 state**(`internal/mcp/oauth_state.go` 注释明确禁止编码进 state 参数)。 - **State 存储**(`oauth_state.go`):有 Redis 时写 `weknora:mcp_oauth_state:`(支持 `WEKNORA_REDIS_NAMESPACE` 命名空间,回调可落在任意后端副本);Lite 模式退化为带 GC 的内存 map。TTL 固定 10 分钟;`Take` 为**取即删**的单次消费。另存一份不含秘密的 `OAuthAttempt` 记录,`CompleteAttempt` 仅在 token 成功落库后置 `Completed=true`——因此新弹窗的授权状态查询(`status?authorization_attempt=`)**绝不会被历史 token 误判为已完成**。 -- **回调**(`oauth_manager.go` 的 `CompleteAuthorization` + `internal/handler/mcp_oauth.go` 的 `Callback`):回调路由公开无鉴权,靠单次 state 认证;由于浏览器收到重定向后 Gin 请求 ctx 即取消,token 交换用 `context.WithoutCancel + 60s` 超时(`oauthCallbackTimeout`)脱离请求生命周期。交换成功后 `CloseClient(serviceID)` 回收可能携带旧注册信息的连接,最后把结果编码在 URL fragment(`#mcp_oauth_result=success` / `#mcp_oauth_error=...`)重定向回前端。 +- **回调**(`oauth_manager.go` 的 `CompleteAuthorization` + `internal/handler/mcp_oauth.go` 的 `Callback`):回调路由公开无鉴权,靠单次 state 认证;由于浏览器收到重定向后 Gin 请求 ctx 即取消,token 交换用 `context.WithoutCancel + 60s` 超时(`oauthCallbackTimeout`)脱离请求生命周期。交换成功后 `CloseClientsAfterAuthorization(ctx, tenantID, serviceID, principal)` 回收当前授权主体的连接,以及同空间仍使用旧 client_id 的过期连接;其余用户的有效连接保留。注册信息读取失败时会保守清理该服务连接,请求已取消时仅清理当前主体,最后把结果编码在 URL fragment(`#mcp_oauth_result=success` / `#mcp_oauth_error=...`)重定向回前端。 - **重建 handler 的 CSRF 检查**:回调请求里 handler 是重新构造的,需 `h.SetExpectedState(state)` 重新灌入期望 state,mcp-go 的 CSRF 校验才能通过。 ##### Token 的加密存储(oauth_tokenstore.go + types/mcp_oauth.go) diff --git a/website-docs/03-features/14-wiki.md b/website-docs/03-features/14-wiki.md index 536597ac..209e5ca7 100644 --- a/website-docs/03-features/14-wiki.md +++ b/website-docs/03-features/14-wiki.md @@ -18,10 +18,20 @@ Wiki 将知识库资料整理为相互链接的 Markdown 页面。文档入库 Wiki 生成会增加模型调用,用量取决于文档规模和抽取密度。可在知识库 Wiki 配置中选择 `focused`、`standard` 或 `exhaustive`,详细说明见[抽取粒度](#抽取粒度)。 +## 浏览 Wiki 图谱 {#wiki-graph} + + hint="展示新图谱布局、主题说明及分组聚焦状态,可点击节点打开条目。" /> + +图谱按页面关联组织分组布局,并展示概括组内内容的主题说明。节点与标题会避让重叠,便于从整体关系找到感兴趣的内容。 + +- 点击分组主题可聚焦这组页面,使用分组菜单切换其他组,通过「返回全图」或 Esc 退出聚焦。 +- 可隐藏无关联页面,也可继续通过搜索与页面类型筛选定位条目。 +- 点击节点阅读页面,沿连线查看关联;页面与来源文档的摘要页建立连接,便于追溯资料。 + +此图展示 Wiki 页面之间的链接关系,与知识库设置中抽取实体和关系的知识图谱不同。 ## 编辑和回滚页面 diff --git a/website-docs/03-features/18-chat-experience.md b/website-docs/03-features/18-chat-experience.md index 8811f9ef..64fc996b 100644 --- a/website-docs/03-features/18-chat-experience.md +++ b/website-docs/03-features/18-chat-experience.md @@ -24,14 +24,18 @@ 高亮范围按回答中被引用的那句话缩小到最相关的段落。在此功能上线前入库的文档没有位置信息,会在原文中按文字查找,找不到时提示并停留在文档开头;重新解析后即可精确定位。手动录入的知识和 FAQ 没有原始文件,点击引用仍显示引用列表。面板顶部「全部引用」返回列表,列表中文档卡片上的「查看原文」按钮也可以打开原文。嵌入渠道的访客无权读取原文件,只显示引用列表。 + src="/screenshots/chat-source-location.png" + caption="对话页:点击引用定位原文" + hint="展示带引用的回答及右侧打开的 PDF 或 Office 原文件,高亮对应段落,并保留返回全部引用入口。" /> 快速问答完成检索后,等待模型返回内容的阶段显示“正在连接模型并生成回答…”;没有执行检索的问答显示“正在准备回答…”。等待超过 60 秒时,提示变为“模型响应较慢,仍在等待…”。这一提示反映当前等待状态,回答和工具执行结果以实际返回内容为准。 回答达到模型单次输出上限而被截断时,回答工具栏会出现提示图标,说明以上为截断前已生成的内容。需要完整回答时,可缩小问题范围,或在智能体配置中调大最大输出长度。 +## 查找提及与未读回答 + +输入 `@` 后可直接搜索当前可选的知识库、文档、标签、技能与 MCP 服务;结果仍受当前智能体的范围和权限限制。侧栏会标记有未读回答的会话,方便离开后回来查看。回滚确认框会说明将删除的对话及工作区影响。 + ## 调整思考强度 所选模型支持分档思考时,输入框底部模型选择旁会显示「思考强度」,可在关闭、自动、极低、低、中、高、极高、最大中选择该模型支持的档位。默认沿用智能体配置;改选后只对当前会话生效,不修改智能体,重新打开会话时会恢复上次的选择。切换到不支持该档位的模型时,选择自动失效。 @@ -61,13 +65,20 @@ 智能体绑定沙箱时,系统在每轮回答结束后记录工作区检查点。分叉会带上分叉点对应的工作区文件;无法带上时(如沙箱已回收或更换),分叉仍会成功,新会话使用全新的沙箱。回滚会把工作区一并退回到保留的最后一轮;当前沙箱找不到对应检查点时,为避免文件与对话不一致,回滚会被拒绝。没有沙箱,或使用桌面版本机目录作为工作区时,只回滚对话,不改动文件。 -## 使用临时附件提问 +## 使用会话附件提问 {#使用临时附件提问} 在对话中上传文件,即可围绕文件内容提问。附件仅供当前会话使用,不进入知识库列表或向量索引。需要长期检索、共享的资料应上传到知识库。 -上传后,系统异步解析文件,并显示上传、处理中和就绪状态。发问时尚未完成解析的附件会继续等待,默认等待上限为 60 秒。扫描件和图片型文档可通过视觉模型识别文字。 +上传会保存原文件并排入后台解析队列,上传成功不等于解析完成。两种对话模式读取内容的时机不同: -临时附件从上传时起计算保留期限,默认 24 小时,到期后由后台任务清理。管理员可调整保留期限、解析等待时间及 OCR 参数,具体配置见文末的“配置与接口参考”。 +- **快速问答**:发送问题并建立回答流后,如果附件仍在解析,会显示解析步骤并等待;默认等待上限为 60 秒,超时后使用已就绪的附件,跳过未完成项。 +- **智能推理**:先把文件名、状态、目录等附件清单交给智能体;已就绪的小文件可直接带入上下文,其余内容由 `read_file` 按需读取,读取仍在解析的文档时才等待解析完成。可以分页读正文、按编号查看文档中的图片,无需先配置沙箱。单独上传的图片在启用图片上传时会先等待就绪,以便传入模型。 + +支持视觉的对话模型直接读取图片;非视觉模型可使用配置的视觉模型生成描述。同一图片、模型与读取要求的成功描述可复用,不把局部观察当成整份文档的 OCR。扫描件和图片型文档仍可通过视觉模型识别文字。 + +尚未发送、或已经不被任何有效会话消息引用的附件,按上传时计算的期限清理,默认 24 小时。已发送的附件只要仍被原会话或分叉会话引用,就会保留,便于继续阅读历史文件。管理员可调整保留期限、解析等待时间及 OCR 参数,具体配置见文末的“配置与接口参考”。 + + 智能体可配置允许上传的文件类型、图片理解开关,以及按文件类型选择的解析引擎。相关说明见 [Agent 引擎](07-agent.md)。 @@ -125,8 +136,8 @@ IM、网页嵌入和 API 调用产生的会话,分别按 IM 身份、访客或 | 配置项 | 默认值 | 作用 | | --- | --- | --- | -| `WEKNORA_CHAT_ATTACHMENT_WAIT_TIMEOUT_SEC` | 60 秒 | 发问时等待附件完成解析的上限 | -| `WEKNORA_CHAT_ATTACHMENT_TTL_HOURS` | 24 小时 | 从上传时起计算的附件保留期限 | +| `WEKNORA_CHAT_ATTACHMENT_WAIT_TIMEOUT_SEC` | 60 秒 | 快速问答或智能体按需读取时,等待附件完成解析的上限 | +| `WEKNORA_CHAT_ATTACHMENT_TTL_HOURS` | 24 小时 | 未被有效会话消息引用的附件清理期限,从上传时起计算 | | `WEKNORA_CHAT_ATTACHMENT_OCR_CONCURRENCY` | 8 | OCR 并发数 | | `WEKNORA_CHAT_ATTACHMENT_OCR_MAX_PAGES` | 8 | OCR 页数上限 | diff --git a/website-docs/03-features/20-platform-admin.md b/website-docs/03-features/20-platform-admin.md index 3ad34ac6..1ca36763 100644 --- a/website-docs/03-features/20-platform-admin.md +++ b/website-docs/03-features/20-platform-admin.md @@ -16,7 +16,7 @@ + hint="以系统管理员身份打开「设置」,展示侧栏的系统设置、模型目录、任务队列、平台 API Key、系统审计日志五个仅系统管理员可见的分区,正文可用系统设置页。" /> ## 设置首个系统管理员 {#_1-第一个系统管理员怎么来} @@ -47,14 +47,22 @@ - **重置用户密码**(`POST /system/admin/users/reset-password`):替换目标用户的本地密码并吊销其全部会话。**不能给自己重置**——自助改密码仍要求提供旧密码; - **批量套用默认存储配额**(`POST /system/admin/tenants/apply-default-storage-quota`):把当前的默认配额写到所有已存在的空间上。该操作更新已有空间的配额数据。 +### 管理平台用户 + +「设置 → 系统设置 → 用户管理」集中展示整个部署的用户,可创建账号、启用或停用账号、重置密码,以及授予或撤销系统管理员身份。停用账号会立即吊销其登录会话;不能停用自己或最后一位仍启用的系统管理员。用户列表不包含密码或密码哈希。 + + + +注册模式分为开放注册、仅限邀请注册、禁止注册三档;`invite_only` 对应禁止注册,需凭邀请新建账号时选择 `invite_register`。OIDC 与管理员创建账号不受密码注册档位限制。 + ### 创建用户 -自 v0.8.2 起,系统管理员可在「设置 → 系统设置 → 账户与访问」中点击「创建用户」开通本地账号:填写用户名(2–50 字符)和邮箱,保持「自动生成随机密码」开启,或关闭后手动填写符合密码策略的密码。适用于关闭公开注册后由管理员统一开户的场景。空间分配遵循 `auth.default_tenant_mode`:`create_personal` 创建个人空间,`tenantless` 等待用户加入空间。 +自 v0.8.2 起,系统管理员可在「设置 → 系统设置 → 用户管理」中点击「创建用户」开通本地账号:填写用户名(2–50 字符)和邮箱,保持「自动生成随机密码」开启,或关闭后手动填写符合密码策略的密码。适用于关闭公开注册后由管理员统一开户的场景。空间分配遵循 `auth.default_tenant_mode`:`create_personal` 创建个人空间,`tenantless` 等待用户加入空间。 + caption="用户创建成功:复制账号信息并保存一次性密码" + hint="「设置 → 系统设置 → 用户管理」下打开「创建用户」对话框,展示用户名、邮箱与「自动生成随机密码」开关;可另附创建成功后显示一次性密码和「复制账号信息」按钮的结果页。" /> 自动生成的密码仅在本次创建结果显示,应当场复制完整账号信息;确认前对话框不能关闭,关闭后不能再次查询明文。每次创建都会写入系统审计日志(`system.user_created`)。重复身份返回已有用户,不改密码;邮箱和用户名分别指向不同用户时拒绝创建。接口见[系统 API](../04-api/02-api-system.md)。 @@ -66,7 +74,7 @@ | 键 | 类型 | 默认 | 生效时机 | | --- | --- | --- | --- | -| `auth.registration_mode` | `self_serve` / `invite_only` | `self_serve` | 立即 | +| `auth.registration_mode` | `self_serve` / `invite_register` / `invite_only` | `self_serve` | 立即 | | `auth.default_tenant_mode` | `create_personal` / `tenantless` | `create_personal` | 只影响之后注册的新用户 | | `tenant.self_service_creation_enabled` | bool | `true` | 立即 | | `tenant.max_owned_per_user` | int | `10`(0 = 用内置默认,负数 = 关闭限额) | 每次建空间时读取 | diff --git a/website-docs/03-features/22-skills-sandbox.md b/website-docs/03-features/22-skills-sandbox.md index f65e0948..ed8f2a53 100644 --- a/website-docs/03-features/22-skills-sandbox.md +++ b/website-docs/03-features/22-skills-sandbox.md @@ -95,6 +95,12 @@ Cube/E2B 的 `config.network` 同时用于对话沙箱、技能安装和完整 - **限制**:命令默认不能联网,只能写入项目目录,项目内的 `.git` 为只读。主目录中除常用开发工具链(如 `.nvm`、`.pyenv`、`.cargo`)外的内容不可读,`.ssh`、`.aws`、钥匙串等凭据位置始终不可读。 - **回退**:对话回退不会还原本机项目文件,需要时请自行用 Git 管理。 +### 在 Lite 桌面版安装本机技能 + +macOS 桌面版可在「工具箱 → 技能管理」将技能安装到「本机」,智能体只能选择已安装且启用的本机技能。技能目录保存可复用的包,本机安装在 `~/.weknora/skills` 下维护版本目录;安装和校验成功后才切换生效版本,失败不替换正在使用的旧版本。本机安装不生成 Docker/E2B/Cube 快照。 + +技能执行继续使用本机沙箱,项目文件不会自动进入远程沙箱产物列表。桌面版的本机技能与标准部署的远程沙箱安装目标不同;不要把远程安装路径直接复制成本机路径。 + ## 环境变量与凭据 个人变量入口在「设置 → 沙箱密钥」;空间级技能变量在「工具箱 → 技能管理」的技能卡上配置。列表只显示变量声明、是否设置和来源,不回显秘密值。 diff --git a/website-docs/03-features/25-seafile.md b/website-docs/03-features/25-seafile.md index e0615af2..8c4d9962 100644 --- a/website-docs/03-features/25-seafile.md +++ b/website-docs/03-features/25-seafile.md @@ -2,6 +2,9 @@ `seafile` 将一个 Seafile 资料库中勾选的目录和文件同步到知识库,支持定时、增量、断点续传和源端删除对账。兼容基线为 Seafile 社区版 Server 10.0.1(api2 接口)。通用同步流程见[数据源同步](10-datasource.md)。 + + + ## 账号与 API Token 使用一个能登录 Seafile、对目标资料库至少有只读权限的账号;同步范围以该账号的权限为准。凭据是该账号的用户 API Token,连接器只保存和使用 Token,不处理账号密码、SSO 登录或资料库专用令牌。 diff --git a/website-docs/04-api/01-api-overview.md b/website-docs/04-api/01-api-overview.md index 27c268ce..81174b4a 100644 --- a/website-docs/04-api/01-api-overview.md +++ b/website-docs/04-api/01-api-overview.md @@ -277,11 +277,13 @@ X-Accel-Buffering: no rerank 的过程和问答链路、智能推理的 `search_knowledge` 工具共用同一套实现(`internal/reranking`): -1. 送给模型打分的文本 = 文档标题 + 去掉 Markdown 标记的分块正文 + 图片描述与 OCR 文本 + 生成的问题。FAQ 条目不加标题。模型配置了单篇或单次请求长度上限(`max_document_chars` / `max_request_chars`)时,超长的文本从尾部截到上限再送出,先截掉的是附加的图片文本和生成问题;不会因为一条超长文本让整批打分失败。 +1. 文本候选送给模型打分的文本 = 文档标题 + 去掉 Markdown 标记的分块正文 + 图片描述与 OCR 文本 + 生成的问题。FAQ 条目不加标题。模型配置了单篇或单次请求长度上限(`max_document_chars` / `max_request_chars`)时,超长的文本从尾部截到上限再送出,先截掉的是附加的图片文本和生成问题;不会因为一条超长文本让整批打分失败。 2. 保留分数不低于 `threshold` 的结果。如果一条都没有、而 `threshold` 高于 0.3,就把阈值降到 `max(threshold×0.7, 0.3)` 再筛一次。还是没有的话,最高分不低于 0.15 时只保留这一条,否则返回空列表。 3. 排序分 = `0.6×模型分 + 0.3×召回分 + 0.1×来源权重`;结果的 `metadata` 里带 `model_score` 和 `base_score`。 4. 用 MMR(λ=0.7)从中挑出 `top_k` 条,降低内容重复。 +图片向量命中还可按原图重排:需要重排模型声明并实现图片输入,普通文本重排仍使用文本信息;视觉对话模型可以接收保留下来的命中图片。图片候选的保留与上下文规则见[检索问答流程](../02-architecture/04-rag-pipeline.md)。 + `hybrid-search` 开启 rerank 时,召回深度至少与 `top_k` 相同,候选池是融合后排名前 `max(top_k, 50)` 的分块,所以 `match_count` 很小也有足够的候选给模型挑。 rerank 模型加载失败或调用出错时,请求不会失败,而是按召回顺序返回,并在 `meta.rerank` 里写明原因。 @@ -349,7 +351,7 @@ rerank 模型加载失败或调用出错时,请求不会失败,而是按召 | 认证与用户 | [02-api-auth.md](./02-api-auth.md) | `/auth`、`/me/invitations` | | 租户(空间)与成员 | [02-api-tenant.md](./02-api-tenant.md) | `/tenants` | | 组织与共享 | [02-api-org.md](./02-api-org.md) | `/organizations`、`/shared-*`、`/knowledge-bases/:id/shares`、`/agents/:id/shares` | -| 知识库与知识 | [02-api-knowledge.md](./02-api-knowledge.md) | `/knowledge-bases`、`/knowledge`、知识库文件夹 | +| 知识库与知识 | [02-api-knowledge.md](./02-api-knowledge.md) | `/knowledge-bases`、`/knowledge`、知识库文件夹、画廊、`/image-attrs/schema` | | 分块与标签 | [02-api-chunks.md](./02-api-chunks.md) | `/chunks`、`/knowledge-bases/:id/tags`、`/chunker/preview` | | FAQ 与 Wiki | [02-api-faq-wiki.md](./02-api-faq-wiki.md) | `/knowledge-bases/:id/faq`、`/faq`、`/knowledgebase/:kb_id/wiki`、`/wiki-search` | | 会话、消息与聊天 | [02-api-chat.md](./02-api-chat.md) | `/sessions`、`/messages`、`/knowledge-chat`、`/agent-chat`、`/knowledge-search` | diff --git a/website-docs/04-api/02-api-agent-mcp.md b/website-docs/04-api/02-api-agent-mcp.md index 9e536afe..6b16c534 100644 --- a/website-docs/04-api/02-api-agent-mcp.md +++ b/website-docs/04-api/02-api-agent-mcp.md @@ -26,6 +26,12 @@ curl $BASE/api/v1/agents/placeholders -H "Authorization: Bearer $TOKEN" curl $BASE/api/v1/agents/type-presets -H "Authorization: Bearer $TOKEN" ``` +### GET /api/v1/agents/tools + +用途:获取智能体可选的内置工具目录,权限 Viewer+。响应 `{"success":true,"data":{"tools":[...],"default_tools":[...],"switch_managed_tools":[...]}}`;每项工具带 `requirement.any_of` / `all_of` 知识库能力要求,编辑器据此判断是否可选。 + +创建或更新时新增未知工具名返回 400;已存储的未知项保留,响应顶层 `allowed_tools_warnings.kept_unknown` 列出这些名称。由独立开关管理的工具及无后继的旧技能工具从列表移除,`allowed_tools_warnings.dropped` 返回移除项。旧检索工具名会映射为后继工具,重复项去重。 + ### POST /api/v1/agents 用途:创建自定义 Agent。权限:Contributor+。 @@ -37,7 +43,7 @@ curl $BASE/api/v1/agents/type-presets -H "Authorization: Bearer $TOKEN" | `avatar` | string | 否 | 头像/emoji | | `config` | object | 否 | Agent 配置(`types.CustomAgentConfig`,见下) | -`config` 主要字段:`agent_mode`(`quick-answer`/`smart-reasoning`)、`agent_type`(`rag-qa/wiki-qa/hybrid-rag-wiki/data-analysis/custom`)、`system_prompt`、`model_id`、`temperature`(0-2,非法返回 code 2103)、`max_iterations`(1-20,非法返回 code 2102)、`allowed_tools`(智能推理必填至少一个,code 2101)、`mcp_selection_mode`/`mcp_services`、`skills_selection_mode`、`kb_selection_mode`/`knowledge_bases`、`web_search_enabled`、`question_suggestions` 等(完整定义见 `internal/types/custom_agent.go`)。 +`config` 主要字段:`agent_mode`(`quick-answer`/`smart-reasoning`)、`agent_type`(`rag-qa/wiki-qa/hybrid-rag-wiki/data-analysis/custom`)、`system_prompt`、`model_id`、`temperature`(0-2,非法返回 code 2103)、`max_iterations`(1-20,非法返回 code 2102)、`allowed_tools`(未设置/null 使用默认工具,显式 `[]` 不选内置工具;联网、记忆、MCP 与沙箱按独立配置注册)、`mcp_selection_mode`/`mcp_services`、`skills_selection_mode`、`kb_selection_mode`/`knowledge_bases`、`web_search_enabled`、`question_suggestions` 等(完整定义见 `internal/types/custom_agent.go`)。 响应:201 `{"success":true,"data":{id,name,description,avatar,is_builtin,created_by,config,creator_name,...}}` diff --git a/website-docs/04-api/02-api-chat.md b/website-docs/04-api/02-api-chat.md index 3ed98bbf..7985dc2b 100644 --- a/website-docs/04-api/02-api-chat.md +++ b/website-docs/04-api/02-api-chat.md @@ -268,7 +268,7 @@ Handler: `internal/handler/session/temporary_document.go` ### POST /api/v1/sessions/:session_id/attachments -用途:上传会话级临时文档(异步解析)。multipart 字段:`file`(必填)、`agent_id`(可选,决定解析引擎/ASR 模型)、`parser_engine`(可选;使用共享智能体时忽略,由智能体的解析规则决定)。 +用途:上传并保存会话附件。保存后立即排入后台解析队列,上传完成不代表已解析。快速问答在回答流建立后等待未完成的解析;智能推理通过 `read_file` 按需读取正文,读取时才等待未就绪的文档。单独上传的图片在启用图片上传时会先等待就绪。multipart 字段:`file`(必填)、`agent_id`(可选,决定解析引擎/ASR 模型)、`parser_engine`(可选;使用共享智能体时忽略,由智能体的解析规则决定)。 响应:202 `{"success":true,"data":{TemporaryDocument}}`(`id,session_id,file_name,file_type,file_size,status(uploaded/processing/ready/failed),resource_ref,...`) @@ -276,6 +276,8 @@ Handler: `internal/handler/session/temporary_document.go` curl -X POST $BASE/api/v1/sessions/s-1/attachments -H "Authorization: Bearer $TOKEN" -F 'file=@notes.pdf' ``` +`uploaded` 是可发送的已存储状态,客户端不应强制等到 `ready` 才允许提问。附件被有效会话消息(含分叉)引用期间不受默认 24 小时 TTL 清理;未引用的过期文件才由后台清理。 + ### GET /api/v1/sessions/:id/attachments 用途:附件列表。 @@ -370,7 +372,7 @@ Handler: `internal/handler/session/qa.go`。API key:聊天需 `chat`/full;`k | 字段 | 类型 | 必填 | 说明 | | --- | --- | --- | --- | -| `query` | string | 是(`binding:"required"`) | 用户问题;为空、仅含空白、含控制字符或非法 UTF-8 时返回 400 | +| `query` | string | 通常必填 | 用户问题;带非空内联 `images[].data` 或 `attachment_uploads[].data` 时可不输入文字,系统生成默认问题。仅传 `attachment_ids` 或图片 URL 不能省略文字;非法字符、无内容请求返回 400 | | `knowledge_base_ids` | []string | 否 | 检索的 KB | | `knowledge_ids` | []string | 否 | 限定知识文件 | | `agent_enabled` | bool | 否 | 是否启用 Agent 模式 | diff --git a/website-docs/04-api/02-api-knowledge.md b/website-docs/04-api/02-api-knowledge.md index 16bed4a7..1345ee26 100644 --- a/website-docs/04-api/02-api-knowledge.md +++ b/website-docs/04-api/02-api-knowledge.md @@ -701,6 +701,42 @@ curl -X POST $BASE/api/v1/knowledge/move -H "Authorization: Bearer $TOKEN" \ -d '{"knowledge_ids":["k-1"],"source_kb_id":"kb-1","target_kb_id":"kb-2","mode":"reuse_vectors"}' ``` +## 画廊与图片属性 {#image-gallery-api} + +画廊读取要求 Viewer+、目标知识库可读;API Key 需 `retrieve` 或 full,并遵守知识库范围。画廊与图片向量开关独立,列表返回已提取图片的描述、OCR 和来源。 + +### GET /api/v1/knowledge-bases/:id/gallery-config + +返回 `{"success":true,"data":{"attribute_sources":[...],"attributes":[...],"mode":"...","status":{...}}}`。客户端据返回的属性定义和使用策略构造搜索、筛选与排序;不要硬编码可用属性。属性 ID 带来源前缀,例如 `builtin:caption`、`system:contain.text`。 + +### GET /api/v1/knowledge-bases/:id/images + +| 查询参数 | 说明 | +| --- | --- | +| `page` / `page_size` | 默认 1 / 20,page_size 最大 1000 | +| `keyword` / `search_in` | 忽略大小写的子串搜索;search_in 为逗号分隔的可搜索属性 ID,默认描述与 OCR | +| `sort_by` / `sort_order` | 可排序属性 ID,默认 created_at / desc;兼容 created_at、updated_at、caption 旧值 | +| `knowledge_ids` | 逗号分隔的来源文档 ID;GET 只取前 50 个,更多文档请使用 POST | +| `is_enabled` | true / false,按所属分块启用状态筛选 | +| `attr_filters` | JSON 对象,属性 ID → 允许值数组,同属性 OR、不同属性 AND | +| `attr_rules` | JSON 对象,属性 ID → 值 → on/off;on 强制显示优先于 off,未命中规则的图片保留 | + +只接受 gallery-config 声明适用的搜索、筛选、排序字段,不适用字段会被剔除。响应 `{"success":true,"data":[ImageAsset],"total":N,"page":1,"page_size":20}`。每项包含 `id`、`chunk_id`、`knowledge_id`、`source_name`、`url`、`original_url`、`caption`、`ocr_text`、`attrs`、`is_enabled`、`status` 与时间戳。 + +### POST /api/v1/knowledge-bases/:id/images + +与 GET 相同的只读查询,参数改放 JSON body;`knowledge_ids`、`search_in` 用字符串数组,`attr_filters` / `attr_rules` 直接传对象。来源文档最多 1000 个,超出返回 400,适合来源筛选全选,避免 URL 过长。 + +```bash +curl -X POST "$BASE/api/v1/knowledge-bases/kb-1/images" -H "X-API-Key: $API_KEY" \ + -H 'Content-Type: application/json' \ + -d '{"page":1,"page_size":20,"knowledge_ids":["k-1","k-2"],"keyword":"架构"}' +``` + +### GET /api/v1/image-attrs/schema + +全局只读的图片观察属性注册表,需 Viewer+,API Key 需 retrieve/full,无路径知识库。知识库编辑器用它配置图片观察与 OCR 条件;画廊的实际搜索/筛选用法仍以每个知识库的 gallery-config 为准。 + ## 实现参考 路由注册:`internal/router/routes_knowledge.go` 的 `RegisterKnowledgeBaseRoutes`、`RegisterKnowledgeRoutes`。Handler:`internal/handler/knowledgebase.go`、`internal/handler/knowledge.go`。 diff --git a/website-docs/04-api/02-api-model-system.md b/website-docs/04-api/02-api-model-system.md index 629f4c68..70b39c8f 100644 --- a/website-docs/04-api/02-api-model-system.md +++ b/website-docs/04-api/02-api-model-system.md @@ -57,7 +57,7 @@ curl "$BASE/api/v1/models/catalog/resolve?provider=deepseek&model=deepseek-v4-pr `parameters` 会按模型目录校验(未知协议、错误的 compat 键、非法思考等级返回 400),`base_url` 经过 SSRF 校验。 -自部署的 `generic` / `Qwen3-VL-Embedding` 默认通过二维 `messages` 批量提交独立输入(已验证 vLLM 0.29.0);单条输入保留一维会话格式。文本沿用 `BATCH_EMBED_SIZE` 分批,图片批量调用的默认上限为 5 张,这是客户端的保守分批设置,可通过 `parameters.spec.compat.max_image_batch_size` 调整。上传解析仍按单张图片调度任务,不会跨任务合并图片。旧版服务若不支持二维 `messages`,可设置 `parameters.spec.compat.batch_messages=false` 恢复逐条请求;其他模型仅在显式启用该能力时使用会话批处理。 +自部署的 `generic` / `Qwen3-VL-Embedding` 默认通过二维 `messages` 批量提交独立输入(已验证 vLLM 0.29.0);单条输入保留一维会话格式。文本沿用 `BATCH_EMBED_SIZE` 分批,图片批量调用的默认上限为 5 张,这是客户端的保守分批设置,可通过 `parameters.spec.compat.max_image_batch_size` 调整。上传解析仍按单张图片调度任务,不会跨任务合并图片。旧版服务若不支持二维 `messages`,可设置 `parameters.spec.compat.batch_messages=false` 恢复逐条请求;WeMM-Embedding 预设也默认启用会话批处理;其他没有该预设的模型需显式启用。 批处理保持各输入的会话内容和向量索引映射,但不保证服务端跨批大小计算逐位相同。要求严格可复现时,应验证部署端的数值行为;vLLM 的 [Batch Invariance](https://docs.vllm.ai/en/v0.29.0/features/batch_invariance/) 模式需要在服务端启用,并针对实际模型验证。可设置 `WEKNORA_EMBEDDING_TEST_URL` 和 `WEKNORA_EMBEDDING_TEST_FIXTURE` 后运行 `go test ./internal/models/embedding -run '^TestLiveQwenMessagesBatchParity$' -v -count=1`:fixture 为 `{"texts":[...],"image_paths":[...]}`,文本和图片均至少两个;私有/IP 端点需配置 `SSRF_WHITELIST`,鉴权可使用 `WEKNORA_EMBEDDING_TEST_API_KEY`。该测试比较逐条、分批、倒序和重复逐条请求,记录最大绝对误差与最低余弦相似度,超过严格阈值会失败,不写入知识库。 diff --git a/website-docs/04-api/02-api-system.md b/website-docs/04-api/02-api-system.md index e3a30cbb..7ae01fa7 100644 --- a/website-docs/04-api/02-api-system.md +++ b/website-docs/04-api/02-api-system.md @@ -281,6 +281,18 @@ curl $BASE/api/v1/system/admin/audit-log -H "Authorization: Bearer $TOKEN" 路由注册:`internal/router/routes_auth_tenant.go` 的 `RegisterSystemAdminRoutes` 与 `RegisterSystemRoutes`。Handler:`internal/handler/system.go`、`internal/handler/audit_log.go`。 +## 平台用户管理 + +以下接口仅系统管理员的用户会话可访问,API Key 不开放。 + +### GET /api/v1/system/admin/users + +分页列出整个部署的用户。查询参数 `offset` 默认 0;`limit` 默认 50,最大 200。响应为未包装对象 `{"users":[UserInfo],"offset":0,"limit":50,"has_more":false}`,不返回密码或哈希。 + +### POST /api/v1/system/admin/users/status + +请求体 `{"user_id":"目标用户 ID","is_active":false}`,两个字段都必填。停用会吊销目标用户的已有会话;不能停用自己或最后一位启用的系统管理员(400),用户不存在返回 404。成功返回 `{"message":"User status updated","user":UserInfo,"is_active":false}`。创建账号与重置密码仍使用上文的 `/users/create`、`/users/reset-password`。 + ## 模型目录(/api/v1/system/admin/model-catalog) 仅系统管理员用户会话可访问,API Key 不开放此组接口。 diff --git a/website-docs/05-clients/01-frontend.md b/website-docs/05-clients/01-frontend.md index 1aac8b22..31c85f58 100644 --- a/website-docs/05-clients/01-frontend.md +++ b/website-docs/05-clients/01-frontend.md @@ -8,7 +8,7 @@ WeKnora 的 Web 前端是一个基于 **Vue 3 + TypeScript + Vite** 的单页应 ## 技术栈总览 -依据 `frontend/package.json`(版本 0.8.2): +依据 `frontend/package.json`(版本 0.8.3): | 类别 | 选型 | 版本 | 说明 | | --- | --- | --- | --- | diff --git a/website-docs/05-clients/05-desktop.md b/website-docs/05-clients/05-desktop.md index 1a723b84..d18848b6 100644 --- a/website-docs/05-clients/05-desktop.md +++ b/website-docs/05-clients/05-desktop.md @@ -6,6 +6,8 @@ WeKnora Lite 桌面应用基于 [Wails v2](https://wails.io),在桌面进程中运行 Go 后端,使用 SQLite 和本地文件存储。启动后可管理知识库并进行检索问答,无需 Docker 或外部数据库。源码位于 `cmd/desktop/`,基础能力与[单二进制 Lite](../01-getting-started/02-installation.md)一致;桌面版另外提供免登录启动,以及在 macOS 上运行智能体命令的[本机沙箱](../03-features/22-skills-sandbox.md#lite-host)。 +v0.8.3 起,macOS 桌面版可在工具箱安装、升级并运行本机技能,详见[本机技能](../03-features/22-skills-sandbox.md#在-lite-桌面版安装本机技能)。 + ## 总体架构 {#_1-总体架构} 桌面应用由三部分组成(均在同一进程内): diff --git a/website-docs/06-development/01-dev-guide.md b/website-docs/06-development/01-dev-guide.md index 876aabad..634e9c50 100644 --- a/website-docs/06-development/01-dev-guide.md +++ b/website-docs/06-development/01-dev-guide.md @@ -10,7 +10,7 @@ WeKnora 由三个可独立开发的进程组成: | --- | --- | --- | --- | | 主后端 `app` | `cmd/server` + `internal/` | Go | **Go 1.26.0**(`go.mod` 中 `go 1.26.0`),需 CGO(DuckDB、sqlite-vec 绑定) | | 文档解析服务 `docreader` | `docreader/` | Python + gRPC | **Python >= 3.10.18**(`docreader/pyproject.toml` 中 `requires-python`),依赖用 **uv** 管理(仓库含 `uv.lock`,Docker 内 `uv sync --locked`) | -| 前端 `frontend` | `frontend/` | Node.js + Vue 3 | Node 22 系(`devDependencies` 含 `@tsconfig/node22`、`@types/node ^22`),Vite 7 + TypeScript ~6.0 + Vue 3.5 + TDesign,版本号 `0.8.2` | +| 前端 `frontend` | `frontend/` | Node.js + Vue 3 | Node 22 系(`devDependencies` 含 `@tsconfig/node22`、`@types/node ^22`),Vite 7 + TypeScript ~6.0 + Vue 3.5 + TDesign,版本号 `0.8.3` | | CLI | `cli/`(独立 Go module) | Go | Go 1.26(`.github/workflows/cli.yml` 矩阵 `go: ['1.26']`) | 推荐额外安装的开发工具: diff --git a/website-docs/06-development/02-database-schema.md b/website-docs/06-development/02-database-schema.md index 9c117616..e1292d5f 100644 --- a/website-docs/06-development/02-database-schema.md +++ b/website-docs/06-development/02-database-schema.md @@ -8,7 +8,7 @@ WeKnora 使用版本化迁移维护数据库结构,PostgreSQL 与 SQLite 分 | `DB_DRIVER` | 说明 | | --- | --- | -| `postgres` | 标准模式。既支持原生 PostgreSQL(+pgvector),也支持 **ParadeDB**(PostgreSQL 分支,内置 `pg_search`/BM25,官方 compose 默认镜像 `paradedb/paradedb:v0.22.6-pg17`)。GORM DSN 由 `DB_HOST/DB_PORT/DB_USER/DB_PASSWORD/DB_NAME` 拼装,强制 `sslmode=disable`、`TimeZone=UTC` | +| `postgres` | 标准模式。既支持原生 PostgreSQL(+pgvector),也支持 **ParadeDB**(PostgreSQL 分支,内置 `pg_search`/BM25,官方 compose 默认镜像 `paradedb/paradedb:v0.25.11-pg17`)。GORM DSN 由 `DB_HOST/DB_PORT/DB_USER/DB_PASSWORD/DB_NAME` 拼装,强制 `sslmode=disable`、`TimeZone=UTC` | | `sqlite` | Lite 模式。路径取 `DB_PATH`(默认 `./data/weknora.db`),DSN 附加 `_journal_mode=WAL&_busy_timeout=5000&_foreign_keys=on`,并加载 `sqlite-vec` 扩展(`sqlite_vec.Auto()`)做向量检索 | | 其他值 | 直接报错 `unsupported database driver` | @@ -20,14 +20,14 @@ WeKnora 使用版本化迁移维护数据库结构,PostgreSQL 与 SQLite 分 ```text migrations/ -├── versioned/ # PostgreSQL/ParadeDB 版本化迁移:000000-000110 共 111 版(222 个 .up/.down.sql 文件) -├── sqlite/ # SQLite 迁移:000000_init(压平的全量 schema)+ 000001-000030 增量版本 +├── versioned/ # PostgreSQL/ParadeDB 版本化迁移:000000-000118 共 119 版(238 个 .up/.down.sql 文件) +├── sqlite/ # SQLite 迁移:000000_init(压平的全量 schema)+ 000001-000036 增量版本 ├── paradedb/ # ParadeDB 附加脚本:00-init-db.sql、01-migrate-to-paradedb.sql(存量库切换) └── mysql/ # 00-init-db.sql,遗留的一次性 MySQL 建表脚本(未接入代码) ``` -- PostgreSQL 的 `versioned/` 从 `000000_init` 到 `000110_im_channel_locale`; -- `sqlite/` 以 `000000_init` 作为压平后的全量初始化(JSONB→TEXT、SERIAL→AUTOINCREMENT 等方言差异已适配),其后追加增量版本(当前到 `000030_im_channel_locale`),同样由 golang-migrate 顺序执行; +- PostgreSQL 的 `versioned/` 从 `000000_init` 到 `000118_mcp_oauth_timestamp_tz`; +- `sqlite/` 以 `000000_init` 作为压平后的全量初始化(JSONB→TEXT、SERIAL→AUTOINCREMENT 等方言差异已适配),其后追加增量版本(当前到 `000036_messages_attachment_lookup`),同样由 golang-migrate 顺序执行; - `uuid-ossp`、`vector`、`pg_trgm`、`pg_search` 等扩展由 `versioned/` 迁移自行创建(000000、000002);BM25 索引使用中文 Lindera 分词器建在 `embeddings.content` 上; - `paradedb/00-init-db.sql` 除扩展外还含一份旧版建表语句,**没有被 compose 或代码引用**。不要把它挂成数据库 initdb 脚本:它先建出的旧表会让 `000000_init` 失败。 @@ -86,6 +86,14 @@ migrations/ | 000108 | sessions.sandbox_config_tenant_id(BIGINT,默认 0),记录会话所用沙箱配置属于哪个空间;按沙箱配置回填使用共享 Agent 的会话 | | 000109 | sessions.host_workspace_dir(VARCHAR(1024)),Lite 桌面版主机沙箱的项目目录,创建后不再修改 | | 000110 | im_channels.locale(VARCHAR(16),默认空串),IM 渠道固定回复语言,空串使用部署默认值 | +| 000111 | `model_catalog_configs`,管理员目录覆盖与最近版本历史 | +| 000112 | embeddings 的 knowledge_id、chunk_id 索引;普通建索引,大表升级前可先同名 CONCURRENTLY 建立以降低阻塞 | +| 000113 | `chunk_images` 图片投影表与同步触发器,从已有 image_info 回填画廊数据 | +| 000114 | chunks.source_locators,原文引用定位信息 | +| 000115 | 将适用版本的 pg_search / vector 扩展升级到 0.25.11 / 0.8.4,需先切换配套数据库镜像 | +| 000116 | 将历史智能推理 Agent 的空 allowed_tools 数组写为显式默认工具列表 | +| 000117 | messages.attachments 的有效用户消息 GIN 索引,用于附件引用保留查询 | +| 000118 | MCP OAuth token/client 时间戳改为 timestamptz,旧字面值按 UTC 转换 | SQLite 版本号独立演进,不能与 PostgreSQL 数字一一对应: @@ -107,8 +115,13 @@ SQLite 版本号独立演进,不能与 PostgreSQL 数字一一对应: | 000027 | sessions.sandbox_config_tenant_id(对应 000108;Lite 无共享空间,不回填) | | 000028 | 补建 `tenant_skills`、`tenant_skill_snapshots`、`tenant_skill_catalog`、`tenant_user_env_vars`(对应 000086–000090 与 000104)。此前 Lite 缺这四张表,技能读取凭据时报 `no such table` | | 000029–000030 | sessions.host_workspace_dir、im_channels.locale(对应 000109–000110) | +| 000031 | `model_catalog_configs`(对应 000111) | +| 000032–000033 | `chunk_images` 与 source_locators(对应 000113–000114) | +| 000034 | 补齐 MCP usage_instructions 与 mcp_metadata(对应 000092) | +| 000035 | Agent 显式默认工具(对应 000116) | +| 000036 | 有效用户消息附件查询索引(对应 000117,SQLite 使用普通索引) | -000092(`mcp_metadata`、`mcp_services.usage_instructions`)与 000099(pg_search 升级)没有 SQLite 对应版本。 +PostgreSQL 的 000099、000112、000115、000118 没有 SQLite 对应版本。 基线 schema 与后续增量共同决定新建库和已有库的最终结果;不能只看新增迁移文件名判断 Lite 是否有某张表。 @@ -131,6 +144,8 @@ SQLite 版本号独立演进,不能与 PostgreSQL 数字一一对应: | `system_settings` | 系统级设置(000053) | `key`、`value`/`value_type`、`category`、`is_secret`、`requires_restart`、`last_modified_by` | | `audit_logs` | 审计日志(000044) | `tenant_id`、`actor_user_id`/`actor_role`、`action`、`target_type`/`target_id`/`target_user_id`、`request_path`/`request_method`、`outcome`(success/denied)、`scope_type`/`scope_id`、`details`(JSONB) | +v0.8.3 新增的 `model_catalog_configs` 保存部署级管理员覆盖(单行 id=1)、版本与历史;`chunk_images` 是 `chunks.image_info` 的可查询投影,触发器保持其与分块写入、删除和状态变化一致。附件保留由有效会话消息引用决定,`expires_at` 只清理已经不被引用的过期附件。 + ### 模型与知识库 {#_3-2-模型与知识库} | 表 | 用途 | 关键字段 | @@ -154,7 +169,7 @@ SQLite 版本号独立演进,不能与 PostgreSQL 数字一一对应: | `message_artifacts` | 技能生成的文件,一行一个(000103) | `session_id`、`message_id`、`position`(消息内序号,即下载接口的 index;与 `message_id` 唯一)、`url`(存储或 resource:// 引用,不返回客户端)、`file_name`/`file_type`/`file_size`、`content_hash`、`source_path`(同会话同路径视为同一文件的多个版本)、`mod_time`(RFC 3339 文本,保留纳秒精度供采集器比对)、`created_at`、`deleted_at`(000107,用户删除文件后保留墓碑行,保持 `position` 稳定且不被重新采集)。消息被软删除时其文件一并隐藏 | | `message_suggestion_sets` | 建议问题集(000067) | `tenant_id`、`session_id`、`assistant_message_id`、`placement`(starter/follow_up)、`config_hash`+`locale`(缓存键,唯一)、`status`、`questions`(JSONB)、token/延迟统计、`lease_until` | | `message_suggestion_events` | 建议问题曝光/点击事件 | `suggestion_set_id`(FK,CASCADE)、`question_id`、`event_type`、`actor_id` | -| `temporary_documents` | 会话内临时文档(000070) | `tenant_id`、`session_id`、`resource_ref`、`file_name`/`file_type`/`file_size`、`status`(uploaded/processing/ready/expired)、`content`、`chunks`(JSONB)、`expires_at` | +| `temporary_documents` | 会话内临时文档(000070) | `tenant_id`、`session_id`、`resource_ref`、`file_name`/`file_type`/`file_size`、`status`(uploaded/processing/ready/failed)、`content`、`chunks`(JSONB)、`expires_at` | ### Agent 与 MCP {#_3-4-agent-与-mcp} diff --git a/website-docs/06-development/03-extension-points.md b/website-docs/06-development/03-extension-points.md index c36cd415..45cd3001 100644 --- a/website-docs/06-development/03-extension-points.md +++ b/website-docs/06-development/03-extension-points.md @@ -341,8 +341,8 @@ type Transcriber interface { ### 现有实现 -- **厂商**:`internal/models/providers/` 下 29 个文件,一个厂商一份(`aliyun.go`、`deepseek.go`、`generic.go`、`weknoracloud.go` 等),由 `builtin.go` 的 `Builtins()` 显式列出;图标在 `providers/assets/.svg`。 -- **协议**:`internal/models/api/`。对话 `openaicompletions`、`openairesponses`、`anthropicmessages`、`googlegenai`;向量 `openaiembeddings`、`dashscopeembeddings`、`arkembeddings`、`googleembeddings`;重排 `cohererank`、`dashscoperank`、`nimrerank`、`tencentlkeap`、`volcengineknowledge`;语音 `openaitranscriptions`、`openaichataudio`。 +- **厂商**:`internal/models/providers/` 定义 30 个内置厂商,一个厂商一份(`aliyun.go`、`deepseek.go`、`generic.go`、`weknoracloud.go` 等),由 `builtin.go` 的 `Builtins()` 显式列出;图标在 `providers/assets/.svg`。 +- **协议**:`internal/models/api/`。对话 `openaicompletions`、`openairesponses`、`anthropicmessages`、`googlegenai`;向量 `openaiembeddings`、`dashscopeembeddings`、`arkembeddings`、`googleembeddings`;重排 `cohererank`、`dashscoperank`、`nimrerank`、`tencentlkeap`、`volcengineknowledge`、`teirank`、`pineconerank`;语音 `openaitranscriptions`、`openaichataudio`。 - **模型目录**:`internal/models/catalog/data/seed.json`(模型元数据)+ `overrides.json`(协议、思考映射与 compat 修正)→ 由脚本生成 `models.generated.json`,编译时嵌入。 - **运行时**:`internal/models/runtime` 组合厂商定义与目录(`New()`),应用部署叠加 `config/models.json`,并为每个模型行解析出协议、端点和兼容设置。 diff --git a/website-docs/07-releases/v0.8.3.md b/website-docs/07-releases/v0.8.3.md new file mode 100644 index 00000000..44f08956 --- /dev/null +++ b/website-docs/07-releases/v0.8.3.md @@ -0,0 +1,125 @@ +# v0.8.3 版本说明 + +发布日期:2026-10-14 + +v0.8.3 让文档中的图片更容易找到和使用:在画廊中浏览图片与图表,通过多模态 Embedding 用文字检索图片内容。回答引用可以直接定位原文,智能体可以按需阅读会话附件。Wiki 图谱改进分组布局与浏览方式,方便从整体关系聚焦到具体主题;此外还新增平台用户管理、模型目录管理和 Seafile 数据源,并改进解析、检索与同步的稳定性。 + +从 v0.8.2 升级前,请先阅读[升级须知](#upgrade-notes)。完整的变更列表见 [CHANGELOG](https://github.com/Tencent/WeKnora/blob/main/CHANGELOG.md)。 + +## 画廊 {#images} + +文档知识库新增「画廊」页签,将文档中的图片集中展示。查找图表、截图或照片时,可以先浏览图片,再打开来源文档核对。 + + + + + +- **搜索与筛选**:搜索图片描述和 OCR 文字,按图片属性筛选,也可以同时选择多份来源文档。 +- **查看图片详情**:放大查看原图,同时阅读描述、识别文字与来源信息。 +- **使用已有图片**:画廊展示文档解析时提取的图片,无需开启图片向量检索。 + +详见[知识库画廊](../03-features/02-knowledge-base.md#image-gallery)。 + +## 多模态 Embedding {#multimodal-embedding} + +支持多模态 Embedding 模型,让文字与图片共同参与检索。用文字提问时,可以找到内容相关的图表、截图或照片,补充图片描述和 OCR 容易遗漏的信息。 + +腾讯 WeMM-Embedding、Qwen3-VL-Embedding 等是已支持的模型示例。本次新增腾讯 WeMM-Embedding 2B、4B、9B 预设,并提供 Transformers 部署脚本,也可接入 vLLM 服务。 + + + +命中的图片还可以交给支持图片输入的重排模型评估相关性,并传给视觉对话模型用于回答。 + +图片向量检索默认关闭。使用前需配置支持图片输入的向量模型,开启知识库多模态处理和图片向量检索;已有文档需重新解析。扫描 PDF 的整页图片不生成图片向量,仍通过 OCR 文本参与检索。模型接入与完整条件见[多模态 Embedding 配置](../03-features/02-knowledge-base.md#multimodal-embedding)、[WeMM 模型接入](../03-features/06-models.md#wemm-embedding)和 [Transformers 部署](../06-development/06-wemm-transformers.md)。 + +## 原文引用与会话附件 {#conversation} + +拥有原文件访问权限时,点击回答中的知识库引用,可以直接打开 PDF、Office、Markdown、TXT、EPUB 等原文件,定位并高亮相关片段。带分段时间的音频引用可以跳到对应位置播放,核对回答更方便。手动录入、FAQ 等没有原文件的内容,以及嵌入聊天的访客,仍通过引用列表查看来源。 + + + +智能体可以先查看附件清单,再按需要分页阅读正文、查看文档中的图片,无需配置沙箱。已发送的附件只要仍被原会话或分叉会话引用,就会保留,后续提问可以继续使用。 + + + +### 用 `@` 选择与搜索资源 + +点击输入框中的 `@` 按钮,或直接输入 `@`,即可打开资源选择菜单,按知识库、标签、技能、文件等类别浏览并选择资源。菜单显示各类别的资源数量,也支持直接搜索多个类别中的资源,或进入某一类别继续筛选,方便在提问时指定要使用的资料与能力。可选资源受当前智能体的配置与访问权限限制。 + + + +会话还新增未读回答标记,改进回滚确认与 Markdown 编辑体验;嵌入聊天支持粘贴截图和只发送图片。详见[会话体验](../03-features/18-chat-experience.md)。 + +## Wiki 图谱:从整体关系到分组浏览 {#wiki-graph} + +Wiki 图谱重新组织了页面关系的展示方式。关联页面分组布局,并显示能概括组内内容的主题说明;节点与标题减少重叠,浏览较大的图谱时更容易找到关注的内容。 + + + +- **先看整体**:在分组轮廓和主题说明中辨认主要内容,沿连线查看页面之间的关联。 +- **聚焦一组页面**:点击分组主题进入聚焦视图,可切换其他分组;通过「返回全图」或 Esc 回到整体。 +- **减少干扰**:标题会避让重叠,可隐藏无关联页面,继续配合搜索与页面类型筛选查找内容。 +- **追溯来源**:页面与其来源文档的摘要页建立连接,便于理解条目来自哪些资料。 + +此外,Wiki 搜索 API 支持跨多个有权限的知识库查询;页面维护改进了表格保留、反向链接标题展示和后台生成任务的处理。这里展示的是 Wiki 页面间的链接关系。详见[Wiki 图谱浏览](../03-features/14-wiki.md#wiki-graph)。 + +## 平台用户与模型管理 {#administration} + +系统管理员可在「设置 → 系统设置 → 用户管理」集中创建账号、启用或停用用户、重置密码和管理系统管理员身份。停用账号会吊销已有登录会话;不能停用自己或最后一位启用的系统管理员。 + + + +注册策略新增「仅限邀请注册」,可让新成员凭邀请创建账号。原有的「禁止注册」模式不再接受邀请注册,升级时需要核对配置,见[升级须知](#upgrade-notes)。 + +模型目录控制台支持编辑模型目录、预览并发布配置,以及查看历史和恢复旧配置。内置厂商增至 30 个,新增 Hugging Face TEI、Pinecone 和 Cohere 重排接入,并补充模型预设与能力信息。 + + + +详见[平台管理](../03-features/20-platform-admin.md)与[模型管理](../03-features/06-models.md)。 + +## 工具、MCP 与沙箱 {#tools} + +- **Docker 交互终端**:Docker 沙箱也能在对话旁打开终端,查看文件和执行命令。断开后当前 Shell 结束,重连会打开新的 Shell。 +- **Lite 本机技能**:macOS 桌面版可在本机安装和运行技能,更新失败时保留仍可用的旧版本。 +- **工具选择**:智能体编辑器按知识库能力展示可选工具,可以明确选择不使用内置工具;技能和 MCP 服务列表新增搜索。 +- **共享智能体与本机浏览器**:通过共享空间使用智能体时,可连接并操作调用者自己的本机浏览器。 +- **MCP 授权**:人工审批通过后,可以继续完成服务所需的 OAuth 授权;支持预注册客户端,以及上游支持时的无浏览器授权方式。 +- **MCP 兼容性**:改进协议协商、会话重连与结果传递,减少授权或慢连接清理对其他调用者的影响。 + +详见[技能和沙箱](../03-features/22-skills-sandbox.md)、[Agent](../03-features/07-agent.md)与 [MCP](../03-features/08-mcp.md)。 + +## 数据源 {#knowledge} + +- **Seafile**:同步同一个未加密资料库中选定的目录和文件,保留目录结构,支持增量同步与可选的删除同步;暂不支持 SeaDoc 在线文档。 +- **Confluence 与语雀**:同步时保留目录层级;Confluence 同时支持私有图片资源。 +- **钉钉文档**:可导入上传到钉盘的 Office、PDF 文件,改进文档内容读取和部分工作区无权访问时的提示。 + +详见[数据源](../03-features/10-datasource.md)、[Seafile](../03-features/25-seafile.md)。 + +## 其他改进与修复 {#other-changes} + +- **解析**:AnyDoc 升至 0.2.4,支持自建 MinerU 4.0 V1 API;修复 EPUB 章节和图片、PPTX 图片关联、异常 Excel 文件及 Markdown 表格的解析问题。 +- **图片处理**:可根据观察到的图片属性决定是否执行 OCR;异常重复、空白或被截断的 OCR 结果不再作为有效内容入库,失败原因可在处理轨迹中查看。 +- **检索**:知识搜索 API 与问答统一重排行为,支持配置检索阈值、检索方式和重排参数,并返回诊断信息;改进结果排序、索引复制和批量写入。 +- **知识图谱**:修复实体关系方向与来源文档信息,明确提示图谱查询结果的截断范围,避免将部分结果当成全部内容。 +- **访问与管理**:修复共享知识库的数据分析权限问题;空间管理员可管理渠道会话,登录凭证保存失败时不再返回登录成功。 +- **同步**:改进 Notion、语雀、IMA、飞书、GitLab 与 RSS 的分页、下载及失败重试,避免来源内容清空后仍能搜到旧正文。 +- **智能体与会话**:修复排队追问的回答归属、追加顺序及上下文压缩问题,改进模型调用超时与重试处理。 +- **IM、CLI 与 SDK**:改进企业微信图文消息、飞书图片和云之家附件处理;CLI 递归上传保留目录,修复列表分页与输出问题;Go SDK 改进流式响应和上传重试;智能体完成事件返回该轮实际使用的对话模型 ID,便于调用方识别模型回退。 +- **部署与界面**:ParadeDB 更新到 `v0.25.11-pg17`,完善 Helm 部署配置;界面新增繁体中文,统一设置、列表、工具箱与引用样式。 + +## 升级须知 {#upgrade-notes} + +先备份数据库、文件存储和配置,再按[安装部署](../01-getting-started/02-installation.md)更新。保留原有 `SYSTEM_AES_KEY`、JWT 与签名密钥。早于 v0.8.2 的部署还需阅读 [v0.8.2 升级说明](v0.8.2.md#upgrade-notes)。 + +| 变化 | 升级操作 | +| --- | --- | +| PostgreSQL `000111`–`000118`、SQLite `000031`–`000036` | 留出迁移时间。`000113` 回填画廊投影;`000112` 普通创建 embeddings 索引,大表可提前同名 `CREATE INDEX CONCURRENTLY`,详见[数据库与迁移](../06-development/02-database-schema.md) | +| ParadeDB / 扩展升级 | 先核对并切换配套镜像,再执行迁移。`000115` 对适用的旧扩展升级至 pg_search 0.25.11 / vector 0.8.4;镜像与扩展不匹配可能导致数据库错误,**不要在新镜像执行旧的 0.22.6 升级命令**,参见[存量库升级](../01-getting-started/06-paradedb-upgrade.md) | +| `invite_only` 不再允许邀请注册 | 需要受邀新用户自行注册时,将运行时 `auth.registration_mode` 改为 `invite_register`;`DISABLE_REGISTRATION=true` 仍对应禁止注册 | +| `allowed_tools: []` 不再表示默认工具 | 旧智能推理 Agent 由迁移写入原默认工具;新 API 请求若需要默认工具应省略或传 null。迁移后的显式默认检索工具会按其能力过滤「全部知识库」范围,检查依赖仅 Wiki 知识库的旧 Agent | +| 图片向量默认关闭 | 按需启用支持图片输入的向量模型、多模态和知识库开关,再重新解析目标文档。改用 Qwen3-VL-Embedding / WeMM 的 messages 编码配置后,旧文本 input 建立的向量需要重建 | +| 原文引用位置 | 旧文档可先用文字回退匹配;需要精确页码/段落定位时重新解析 | +| MCP OAuth 时间戳 | 迁移将旧值按 UTC 转为带时区字段;曾在非 UTC 进程写入的偏移值需重新授权或刷新 token 才能纠正 | +| 已发送附件保留时间变长 | 有有效会话引用就会保留,存储用量随会话历史累积;未引用附件仍按 TTL 清理 | +| Docker 终端断开 | 当前 Shell 会结束,重连是新 Shell;需要继续运行的后台任务应自行使用合适的进程管理方式 | diff --git a/website-docs/README.md b/website-docs/README.md index c1b27d79..3565c150 100644 --- a/website-docs/README.md +++ b/website-docs/README.md @@ -35,7 +35,7 @@ npm run package:site ```bash sudo mkdir -p /srv/www/weknora/releases/20260915-1 -sudo tar -xzf weknora-site-v0.8.2.tar.gz -C /srv/www/weknora/releases/20260915-1 +sudo tar -xzf weknora-site-v0.8.3.tar.gz -C /srv/www/weknora/releases/20260915-1 ``` 解压后该目录下应直接有 `index.html`、`404.html`、`docs/`,无需再套一层 `static-site/`。 @@ -80,8 +80,8 @@ sudo nginx -s reload 在仓库根目录执行: ```bash -docker build -t weknora-site:0.8.2 website-docs -docker run -d --name weknora-site --restart unless-stopped -p 8080:80 weknora-site:0.8.2 +docker build -t weknora-site:0.8.3 website-docs +docker run -d --name weknora-site --restart unless-stopped -p 8080:80 weknora-site:0.8.3 ``` 访问 `http://服务器地址:8080/`。如使用域名和 HTTPS,让现有反向代理转发到该端口即可。镜像内已经包含官网、文档和 Nginx 路由配置。 @@ -89,12 +89,12 @@ docker run -d --name weknora-site --restart unless-stopped -p 8080:80 weknora-si 容器内的 Nginx 默认监听 80 端口,可以用环境变量 `WEBSITE_NGINX_PORT` 修改,无需重新构建。使用 `--network host`,或者部署平台要求容器监听指定端口时,这样设置: ```bash -docker run -d --name weknora-site --restart unless-stopped -e WEBSITE_NGINX_PORT=8080 -p 8080:8080 weknora-site:0.8.2 +docker run -d --name weknora-site --restart unless-stopped -e WEBSITE_NGINX_PORT=8080 -p 8080:8080 weknora-site:0.8.3 ``` 只是想换一个对外端口时,改 `-p` 左侧的宿主机端口就够了,例如 `-p 9000:80`。 -也可以只复制 `website-docs/` 目录,在该目录执行 `docker build -t weknora-site:0.8.2 .`。构建上下文必须是 `website-docs/`,宿主机的依赖、旧构建产物和部署包由 `.dockerignore` 排除。 +也可以只复制 `website-docs/` 目录,在该目录执行 `docker build -t weknora-site:0.8.3 .`。构建上下文必须是 `website-docs/`,宿主机的依赖、旧构建产物和部署包由 `.dockerignore` 排除。 从旧文档镜像迁移时,将容器端口映射或反向代理目标端口从 `8081` 改为 `80`(宿主机端口可自行选择,例如 `-p 8081:80`)。域名根路径 `/` 现在提供官网,`/docs/` 提供文档,反向代理需覆盖整个站点并保留请求路径。容器使用 Nginx 官方镜像的默认入口,无需额外的 `docker-entrypoint.sh`。 @@ -102,7 +102,7 @@ docker run -d --name weknora-site --restart unless-stopped -e WEBSITE_NGINX_PORT ```bash cd website-docs -npm run test:docker -- weknora-site:0.8.2 +npm run test:docker -- weknora-site:0.8.3 ``` ## 本地开发 @@ -142,3 +142,35 @@ npm run test:integration - `releases/`:生成的部署压缩包。 品牌素材来源见 [homepage/BRAND-ASSETS.md](homepage/BRAND-ASSETS.md)。产品视频使用 README 中的 GitHub 原始附件,播放需要访问 GitHub;页面、文档和截图随包部署。 + +## v0.8.3 截图清单 + +文档使用 `Screenshot` 组件展示真实产品截图,首页复用对应图片。维护截图时使用演示数据,隐藏 Token、真实邮箱和内部地址。 + +当前 11 张截图已全部接入,画廊、多模态设置、Wiki 分组图谱、原文引用定位均已同步到首页。多模态截图展示图片向量开关,Seafile 截图展示凭据配置,模型目录截图展示列表,创建用户截图展示成功结果。下表记录截图内容与使用位置,未展示的操作由正文说明。 + +所有文档图片放在 `website-docs/public/screenshots/`: + +| 文件名 | 拍摄内容 | 使用位置 | +| --- | --- | --- | +| `kb-image-gallery-detail.png` | 图片详情,展示原图、图片描述、识别文字与来源文档 | 知识库功能、版本说明、首页 | +| `kb-image-gallery.png` | 画廊瀑布流,展开来源文档多选筛选,包含图表与照片 | 知识库功能、版本说明、首页 | +| `kb-image-vector-settings.png` | 支持图片输入的向量模型、多模态设置和图片向量检索开关(可用腾讯 WeMM-Embedding 示例) | 知识库功能、版本说明、首页 | +| `chat-source-location.png` | 带引用的回答,以及原始 PDF/Office 文件中的对应高亮 | 会话体验、版本说明、首页 | +| `chat-mention-selector.png` | 输入框的 @ 资源选择菜单,展示分类、资源数量和搜索入口 | 版本说明 | +| `chat-attachment-read.png` | 含图片文档的附件卡片、正文按需阅读和图片观察结果 | 会话体验、版本说明 | +| `system-user-management.png` | 用户列表、启停状态、系统管理员标记和操作菜单 | 平台管理、版本说明 | +| `system-model-catalog.png` | 模型目录、来源标记、覆盖编辑或版本历史 | 版本说明 | +| `wiki-graph-groups.png` | 新图谱布局、主题说明与分组聚焦,保留切换分组和返回全图入口 | Wiki 功能、版本说明、首页 | +| `datasource-seafile.png` | Seafile 数据源与资料库/目录/文件选择 | Seafile 功能 | +| `system-admin-create-user.png` | 创建用户成功结果,使用演示账号并隐藏密码 | 平台管理 | + +首页复用其中的 `kb-image-gallery.png`、`kb-image-gallery-detail.png`、`kb-image-vector-settings.png`、`wiki-graph-groups.png`、`chat-source-location.png`,更新时只需替换 `website-docs/public/screenshots/` 中的源图;首页的 `prebuild` / `predev` 会自动同步已有同名副本(终端截图的旧文件名也会对应同步)。添加全新首页截图时,先在 `website-docs/homepage/public/docs/_home/product/` 建立副本。完成后运行 `npm run build`,检查图片引用与本地资源校验结果;页面外观由维护者人工确认。 + +本次发布整理的提交清单、文档核对依据和验证记录保存在主仓库 `docs/release-v0.8.3-audit.md`,不随独立站点发布。v0.8.3 发布日期为 2026-10-14,版本页、CHANGELOG 与四种语言 README 保持一致。 + +首页内容按两层维护:当期版本区以左侧功能导航、右侧截图展示画廊、多模态 Embedding(含腾讯 WeMM 支持)、Wiki 图谱、原文引用定位四项重点;左侧四项说明均保持展开,画廊通过「浏览图片 / 查看详情」切换两张截图;本机浏览器左侧分别展开「执行任务」「连接扩展」两种状态的说明,右侧切换对应截图,MCP Server 归入生态集成,对话追加、分叉与回滚归入 Agent 介绍。技能与沙箱、Wiki、模型生态与企业部署保留独立位置。语言新增等较小更新归入版本说明,后续换版时不要随版本区一并移除这些长期能力。 + +首页每项重点只用一句话说明用途,配置条件放到对应功能文档;引用定位与图谱更新同列版本重点;附件阅读、用户管理、Seafile 与 Docker 终端保留次级链接。本机浏览器复用「执行任务/连接扩展」两张大图与 BrowserSkill 图标、GitHub 入口。版本说明面向使用者,提交计数、代码快照和撤回记录留在发布核对报告。 + +首页章节底色按顺序交替:01/03/05/07 使用基础底色,02/04/06 与使用入口使用浅色背景;深色模式使用对应主题变量。所有章节背景铺满页面,正文使用同一宽度容器,浅色背景区负责相邻章节的分隔线,统一章节间距。 diff --git a/website-docs/VERSION b/website-docs/VERSION index 100435be..ee94dd83 100644 --- a/website-docs/VERSION +++ b/website-docs/VERSION @@ -1 +1 @@ -0.8.2 +0.8.3 diff --git a/website-docs/homepage/BRAND-ASSETS.md b/website-docs/homepage/BRAND-ASSETS.md index cbf28839..79738809 100644 --- a/website-docs/homepage/BRAND-ASSETS.md +++ b/website-docs/homepage/BRAND-ASSETS.md @@ -7,6 +7,7 @@ Paths below written as `public/brand/…`, `public/brands/…` and `public/produ - WeKnora logo: `docs/images/logo.png` from the WeKnora repository (the README logo), copied unchanged to `public/brand/weknora-original.png`. The site preserves all lettering, graphics and proportions. CSS hides only the empty outer canvas and blends the white background into the page; dark mode uses an inverted presentation with hue rotation. The source image remains unchanged. - WeKnora browser icon: copied unchanged from the existing product's `frontend/public/favicon.ico` into the documentation (`/docs/favicon.ico`), which the homepage also uses. The replacement square sail SVG is no longer shipped. - Feishu, GitLab, Tencent IMA, Notion, Yuque, RSS, WeCom, Slack, Telegram: copied unchanged from the WeKnora frontend asset library. +- Seafile: copied unchanged from `frontend/src/assets/img/datasource-seafile.png` to `public/brands/seafile.png`. - OpenAI, DeepSeek, Qwen, Hunyuan, Gemini, Ollama, MCP: static SVGs from [Lobe Icons](https://github.com/lobehub/lobe-icons), `@lobehub/icons-static-svg@1.95.0`. Upstream MIT license included with assets. - Confluence, DingTalk: copied unchanged from the WeKnora frontend asset library (`frontend/src/assets/img/datasource-confluence.svg`, `frontend/src/assets/img/im/dingtalk.svg`). - Claude (Anthropic), Zhipu, Kimi (Moonshot), Volcengine, MiniMax: copied unchanged from `internal/models/providers/assets/`, which carries the same Lobe Icons static SVGs; covered by the included Lobe Icons MIT license. @@ -19,10 +20,17 @@ Paths below written as `public/brand/…`, `public/brands/…` and `public/produ ## Product screenshots +- Update reused screenshots in `../public/screenshots/`. The homepage prebuild/predev hook refreshes existing product copies, including the `sandbox-terminal.png` alias. Do not edit those copies separately. + +- Release highlights also reuse `chat-source-location.png`, copied unchanged from `../public/screenshots/` to `public/docs/_home/product/`. Four features use compact sidebar navigation beside the screenshot, with all descriptions expanded. Attachment reading is a secondary link; its screenshot remains in the documentation. The standalone browser section presents task execution and extension connection as two expanded items on the left, switching the corresponding screenshot on the right. + +- v0.8.3 gallery: `kb-image-gallery.png`, `kb-image-gallery-detail.png`, and `kb-image-vector-settings.png` are real product screenshots copied unchanged from `../public/screenshots/` to `public/docs/_home/product/`. The vector settings image shows the image-vector toggle. The gallery screenshots retain some image-load failure states from the captured interface. Screenshot contents and usage are documented in `../README.md`. + - Skill catalog and sandbox terminal: copied unchanged from `../public/screenshots/skill-catalog.png` and `sandbox-panel-terminal.png` to `public/product/skill-catalog.png` and `sandbox-terminal.png`, for the skills & sandbox gallery. - Sandbox desktop (`public/product/sandbox-desktop.png`): the chat's sandbox panel on the 桌面 tab, showing the XFCE desktop of a desktop template. It shares the 终端与图形桌面 card with the terminal screenshot, switched inside the card. -- v0.8.2 gallery: `mcp-server-endpoint.png`, `chat-steer-queue.png` and `browser-connection.png` copied unchanged from `../public/screenshots/` to `public/product/`. The local browser card switches between two views of the same capability: 任务 (below) and 连接 (the browser connection page). -- Browser task (`public/product/local-browser-task.png`): the default view of the local browser card, a smart-reasoning chat driving the connected Chrome through BrowserSkill (GitHub release lookup, then filling the httpbin.org sample order form without submitting), with the in-chat task preview and pause / end controls. +- The permanent local-browser section reuses `local-browser-task.png` and `browser-connection.png` with the BrowserSkill icon and GitHub link from the v0.8.2 showcase. MCP Server is described within integrations; conversation controls stay in the Agent overview. `mcp-server-endpoint.png` and `chat-steer-queue.png` remain reference assets, without separate homepage showcases. +- Browser task (`public/product/local-browser-task.png`): a smart-reasoning chat driving the connected Chrome through BrowserSkill (GitHub release lookup, then filling the httpbin.org sample order form without submitting), with the in-chat task preview and pause / end controls. - Wiki browser: copied unchanged from `../public/screenshots/wiki-browser.png` to `public/product/wiki-browser.png`. Shows the actual Wiki directory, linked page and source references using sample company policies. -- Wiki graph and revision history: copied unchanged from `../public/screenshots/wiki-graph.png` and `wiki-revision-history.png` to matching files in `public/product/`, for the horizontal Wiki gallery. +- Wiki graph: `wiki-graph-groups.png` is a real product screenshot showing the full graph with grouped regions, theme labels and a node-type legend. It is copied unchanged from `../public/screenshots/` to `public/docs/_home/product/`. +- Historical Wiki graph and revision history: copied unchanged from `../public/screenshots/wiki-graph.png` and `wiki-revision-history.png` to matching files in `public/product/`, the revision-history image remains in the Wiki gallery, while the old graph image is retained for reference. diff --git a/website-docs/homepage/app/brands.tsx b/website-docs/homepage/app/brands.tsx index 198541fd..3de710a7 100644 --- a/website-docs/homepage/app/brands.tsx +++ b/website-docs/homepage/app/brands.tsx @@ -14,6 +14,7 @@ export const dataSources: Integration[] = [ { name: "Notion", logo: "notion.ico" }, { name: "语雀", logo: "yuque.ico" }, { name: "RSS", logo: "rss.svg" }, + { name: "Seafile", logo: "seafile.png" }, ]; export const clients: Integration[] = [ diff --git a/website-docs/homepage/app/home.module.css b/website-docs/homepage/app/home.module.css index 252bbd72..ae8201b8 100644 --- a/website-docs/homepage/app/home.module.css +++ b/website-docs/homepage/app/home.module.css @@ -18,7 +18,7 @@ .skipLink { position: fixed; left: 20px; top: -100px; z-index: 30; padding: 12px 20px; background: var(--ink); color: var(--paper); } .skipLink:focus { top: 12px; } .brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); flex-shrink: 0; } -.hero { padding-top: 51px; } +.hero { padding-top: 24px; } .releaseLink { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 13px; color: var(--soft); font-size: 14px; } .releaseLink > span { border: 1px solid var(--wk-accent-border); padding: 3px 10px; color: var(--wk-accent-text); font-family: ui-monospace, monospace; font-size: 12px; } .releaseLink svg { width: 17px; height: 17px; transition: transform .2s; } @@ -81,8 +81,11 @@ .shotPlaceholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; aspect-ratio: 3840 / 2112; padding: 24px; text-align: center; color: var(--mute); background: repeating-linear-gradient(135deg, var(--paper2) 0 12px, var(--paper) 12px 24px); } .shotPlaceholder > span { font-size: 15px; color: var(--soft); } .shotPlaceholder > code { font-size: 12px; word-break: break-all; } +.mcpEntry { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--rule); } +.mcpEntry h4 { font-size: 16px; font-weight: 550; margin: 0 0 10px; } +.mcpEntry p { font-size: 14px; line-height: 1.85; color: var(--soft); margin: 0 0 12px; } .release { padding-block: 93px 44px; background: var(--paper2); border-block: 1px solid var(--rule); } -.sandboxTopic { background: var(--paper); border-top: 0; padding-bottom: 93px; } +.sandboxTopic { background: var(--paper2); padding-bottom: 93px; } .artifactFigure { margin: 0; min-width: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 5px; box-shadow: 0 18px 45px -35px #101f3844; overflow: hidden; } .artifactHeading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 20px; font-size: 13px; border-bottom: 1px solid var(--rule); } .artifactHeading > span { display: inline-flex; align-items: center; gap: 8px; } @@ -93,7 +96,6 @@ .artifactFigure figcaption > span:last-child { color: var(--mute); } .releaseExtras { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding-top: 29px; margin-top: 48px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--soft); } .releaseExtras > span { color: var(--mute); } -.releaseExtras p { margin: 0; } .site .wiki { border-bottom: 1px solid var(--rule); padding-block: 48px; scroll-margin-top: 64px; } .site section.wiki[id] { scroll-margin-top: 64px; } .wiki .sectionHeading { margin-bottom: 24px; } @@ -181,7 +183,7 @@ .footer > p { color: var(--mute); font-size: 12px; margin: 0; } .footer nav { margin-left: auto; display: flex; gap: 28px; } .footer nav a { display: flex; align-items: center; gap: 4px; min-height: 44px; color: var(--soft); font-size: 13px; } -@media (min-width: 1800px) { .heroGrid { margin-bottom: 62px; } .hero { padding-top: 70px; } } +@media (min-width: 1800px) { .heroGrid { margin-bottom: 62px; } .hero { padding-top: 28px; } } @media (max-width: 1100px) { .shell { width: calc(100% - 64px); } .heroGrid { gap: 32px; grid-template-columns: 1.1fr 1fr; } @@ -197,7 +199,7 @@ @media (max-width: 800px) { .navigationOpen { display: flex; position: absolute; left: 0; top: 72px; right: 0; padding: 20px 32px 26px; background: var(--paper); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; gap: 4px; box-shadow: 0 15px 20px #101f380a; } .navigationOpen a { font-size: 16px; } - .hero { padding-top: 34px; } + .hero { padding-top: 20px; } .heroGrid { align-items: start; grid-template-columns: 1fr; gap: 28px; margin-top: 26px; margin-bottom: 35px; } .hero h1 { font-size: clamp(38px, 6.2vw, 68px); } .heroAside > .eyebrow { display: none; } @@ -269,3 +271,41 @@ :global(.dark) .integrations img, :global(.dark) .models img { background: var(--wk-logo-ground); padding: 2px; border-radius: 3px; } .ecosystemCore > :global(.wk-logo) { margin-bottom: 18px; } + +/* Keep feature descriptions and state controls beside their screenshots. */ +.releaseTopic { padding-top: 48px; } +.releaseTopic .sectionHeading, .browserTopic .sectionHeading { margin-bottom: 24px; } +.releaseTopic .eyebrow, .browserTopic .eyebrow { margin-bottom: 12px; } +.showcaseCompact { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 32px; } +.showcaseCompact .showcaseItem h3 button { padding: 10px 0; gap: 2px; } +.showcaseCompact .showcaseItem::before { top: 12px; bottom: 12px; } +.showcaseCompact .showcaseTitle { font-size: 16px; } +.showcaseCompact .showcaseDetail { padding-bottom: 14px; } +.showcaseCompact .showcaseDetail p { font-size: 14px; line-height: 1.7; } +.showcaseCompact .showcaseFigure { position: sticky; top: 100px; } +.showcaseCompact .shotLayer img { max-height: calc(100svh - 240px); object-fit: contain; } +.site .browserTopic { padding-block: 44px; } +@media (max-width: 1100px) { + .showcaseCompact { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 24px; } +} +@media (max-width: 700px) { + .showcaseCompact { grid-template-columns: minmax(0, 1fr); } + .showcaseCompact .showcaseFigure { position: static; } + .showcaseCompact .shotLayer img { max-height: none; } +} + +/* One page-wide rhythm: tinted bands own their boundaries; content shares one shell. */ +.site .chapter { padding-block: 48px; background: var(--paper); border: 0; } +.site .chapterTint { background: var(--paper2); border-block: 1px solid var(--rule); } +.chapter .sectionHeading { margin-bottom: 28px; } +.chapter .eyebrow { margin-bottom: 12px; } +.site .footer { border-top: 0; } +@media (max-width: 700px) { + .site .chapter { padding-block: 32px; } + .chapter .sectionHeading { margin-bottom: 24px; } +} + +.showcaseDetail p a { color: var(--wk-accent-text); text-decoration: underline; text-underline-offset: 3px; } + +.inlineRepoLink { display: inline-flex; align-items: center; gap: 4px; vertical-align: baseline; } +.inlineRepoLink svg { width: 14px; height: 14px; align-self: center; } diff --git a/website-docs/homepage/app/layout.tsx b/website-docs/homepage/app/layout.tsx index bb7800b0..455af222 100644 --- a/website-docs/homepage/app/layout.tsx +++ b/website-docs/homepage/app/layout.tsx @@ -4,7 +4,7 @@ import { themeInitializationScript } from "./theme"; export const metadata: Metadata = { title: "WeKnora — 帮你找到答案,并将知识付诸实践", - description: "腾讯开源知识框架 WeKnora,集 RAG 问答、Agent 推理与自动 Wiki 于一体。v0.8.2 让智能体操作本机浏览器、以 MCP Server 对外提供知识库,并支持对话分叉与回滚;支持私有化部署。", + description: "腾讯开源知识框架 WeKnora,集 RAG 问答、Agent 推理与自动 Wiki 于一体。v0.8.3 新增画廊、多模态 Embedding、原文引用定位、附件按需读取和平台用户管理;支持私有化部署。", // Reuse the documentation favicon so the homepage adds nothing at the site root. icons: { icon: "/docs/favicon.ico" }, }; diff --git a/website-docs/homepage/app/page.tsx b/website-docs/homepage/app/page.tsx index 32244bad..71de8edb 100644 --- a/website-docs/homepage/app/page.tsx +++ b/website-docs/homepage/app/page.tsx @@ -14,10 +14,15 @@ const docs = "/docs/"; const guide = (path: string) => `${docs}${path}.html`; const modes = [ { number: "01", icon: "search", label: "RAG", title: "回答有据可查", description: "结合语义与关键词检索查找相关资料,回答附带来源引用,可打开原文核对。", tags: ["混合检索", "多模态解析", "原文引用"], link: "03-features/05-retrieval-engines" }, - { number: "02", icon: "agent", label: "Agent", title: "用知识和工具完成任务", description: "智能体根据任务检索知识库、搜索网页、调用 MCP 工具与技能,在沙箱中处理文件、运行脚本,还能操作你电脑上的浏览器,并跨会话记住你确认过的偏好。", tags: ["多步推理", "技能与沙箱", "本机浏览器", "MCP 工具", "长期记忆"], link: "03-features/07-agent" }, + { number: "02", icon: "agent", label: "Agent", title: "用知识和工具完成任务", description: "检索资料、调用 MCP 工具与技能,在沙箱或本机浏览器中完成任务。保留长期记忆,对话中可追加要求、分叉或回滚。", tags: ["多步推理", "技能与沙箱", "本机浏览器", "MCP 工具", "长期记忆"], link: "03-features/07-agent" }, { number: "03", icon: "wiki", label: "Wiki", title: "把文档整理成 Wiki", description: "从原始文档生成相互链接的 Wiki 页面与知识图谱,支持浏览、编辑和版本回滚。", tags: ["自动组织", "知识图谱", "版本回滚"], link: "03-features/14-wiki" }, ]; -const releaseExtras = ["Confluence / 钉钉文档数据源", "27 家模型厂商目录", "博查 / Serply 联网搜索", "日语界面", "仅白名单出站"]; +const releaseExtras = [ + { name: "附件按需读取", link: "03-features/18-chat-experience" }, + { name: "平台用户管理", link: "03-features/20-platform-admin" }, + { name: "Seafile 数据源", link: "03-features/25-seafile" }, + { name: "Docker 交互终端", link: "03-features/22-skills-sandbox" }, +]; const productShotExists = (src: string) => existsSync(join(process.cwd(), "public", src)); type SlideSource = Omit & ({ image: string; alt: string } | { shots: Omit[] }); @@ -26,25 +31,36 @@ const withAvailability = (slide: SlideSource): GallerySlide => { return { name: slide.name, icon: slide.icon, title: slide.title, description: slide.description, link: slide.link, external: slide.external, shots: shots.map(shot => ({ ...shot, available: productShotExists(`${homeAssets}/product/${shot.image}.png`) })) }; }; const releaseSlides = [ - { name: "本机浏览器", icon: "browser", shots: [ - { label: "执行任务", icon: "browser", image: "local-browser-task", alt: "WeKnora 实际界面:智能推理对话正在操作本机浏览器,对话中显示任务预览与暂停、继续、结束控制" }, - { label: "连接扩展", icon: "plug", image: "browser-connection", alt: "WeKnora 实际界面:工具箱的浏览器连接页,BrowserSkill 扩展已连接并列出智能体可执行的网页操作" }, - ], title: "操作你电脑上的浏览器", description: "借助腾讯开源的 BrowserSkill 扩展,智能体直接在你的 Chrome 或 Edge 中打开网页、填写表单;遇到登录或验证码时交给你。", link: guide("05-clients/09-local-browser"), external: { label: "BrowserSkill", href: "https://github.com/Tencent/BrowserSkill", logo: "browserskill.png" } }, - { name: "MCP Server", icon: "plug", image: "mcp-server-endpoint", title: "把知识库发布给其他 AI 工具", description: "为空间创建 MCP 端点,Claude、Cursor 等客户端连上即可检索知识库和提问。", alt: "WeKnora 实际界面:MCP 端点的连接信息,包含端点地址与 Cursor、Claude Desktop 的 mcpServers 配置", link: guide("03-features/08-mcp") }, - { name: "对话控制", icon: "branch", image: "chat-steer-queue", title: "随时调整进行中的对话", description: "回答中途可以补充要求,也能从任意一次提问分叉或回滚;生成的文件统一收在「产物」页。", alt: "WeKnora 实际界面:回答生成期间,输入框上方排队等待的补充要求", link: guide("03-features/18-chat-experience") }, + { name: "画廊", icon: "monitor", shots: [{ label: "浏览图片", icon: "monitor", image: "kb-image-gallery", alt: "知识库画廊:图片瀑布流与来源文档筛选" }, { label: "查看详情", icon: "file", image: "kb-image-gallery-detail", alt: "画廊图片详情:查看原图、图片描述、识别文字与来源文档" }], title: "文档图片,集中浏览", description: "集中浏览文档图片,按来源、描述和图片属性筛选,查看原图与出处。", link: guide("03-features/02-knowledge-base") + "#image-gallery" }, + { name: "多模态 Embedding", icon: "search", image: "kb-image-vector-settings", title: "文字与图片,共同检索", description: <>让图片、图表与文字共同参与知识检索,用自然语言查找相关内容。支持腾讯 WeMM-Embedding、Qwen3-VL-Embedding 等模型。, alt: "多模态 Embedding:知识库图像处理中的图片向量检索开关", link: guide("03-features/02-knowledge-base") + "#multimodal-embedding" }, + { name: "Wiki 图谱", icon: "channels", image: "wiki-graph-groups", title: "知识关系,按主题展开", description: "关联页面按主题分组,在全图与分组之间切换,沿关系找到值得继续阅读的内容。", alt: "Wiki 图谱全景:主题分组、页面关系与节点类型图例", link: guide("03-features/14-wiki") + "#wiki-graph" }, + { name: "原文引用定位", icon: "trace", image: "chat-source-location", title: "从回答,回到原文", description: "点击回答中的引用,在原始文档中定位对应段落,对照上下文核对答案。", alt: "回答引用与原始文档中的对应段落高亮", link: guide("03-features/18-chat-experience") }, +].map(withAvailability); +const browserSlides = [ + { name: "执行任务", icon: "browser", title: "在自己的浏览器里完成任务", + description: "让智能体打开网页、查询信息、填写表单。任务过程实时可见,可随时暂停;遇到登录或验证码时由你接手,完成后继续。", + image: "local-browser-task", alt: "智能体操作本机浏览器,对话中显示任务预览与暂停控制", + link: guide("05-clients/09-local-browser"), + }, + { name: "连接扩展", icon: "plug", title: "连接 Chrome 或 Edge,开始使用", + description: "安装腾讯开源的 BrowserSkill 扩展,在工具箱中连接本机浏览器,查看连接状态,再将网页操作交给智能体。", + image: "browser-connection", alt: "工具箱的浏览器连接页,BrowserSkill 扩展已连接", + link: guide("05-clients/09-local-browser"), + external: { label: "BrowserSkill", href: "https://github.com/Tencent/BrowserSkill", logo: "browserskill.png" }, + }, ].map(withAvailability); const wikiSlides = [ - { name: "知识图谱", icon: "channels", image: "wiki-graph", title: "顺着链接,查看相关知识", description: "在知识图谱中查看页面之间的关系。点击条目,即可阅读相关内容。", alt: "Wiki 知识图谱:日常费用报销条目与相关页面的链接关系,右侧展示条目详情" }, + { name: "知识图谱", icon: "channels", image: "wiki-graph-groups", title: "从整体关系,聚焦一组页面", description: "关联页面分组展示,配上主题说明。聚焦感兴趣的分组,沿链接阅读相关内容,随时返回全图。", alt: "Wiki 图谱:关联页面分组、主题说明和分组聚焦入口", link: guide("03-features/14-wiki") + "#wiki-graph" }, { name: "页面浏览", icon: "wiki", image: "wiki-browser", title: "按主题整理,保留出处", description: "开启 Wiki 后,从知识库文档中提取人物、产品和概念,生成带来源引用的页面,按目录浏览。", alt: "Wiki 浏览器:按主题组织的目录、年假页面、关联条目和原始文档引用" }, { name: "版本历史", icon: "history", image: "wiki-revision-history", title: "随时编辑,改动可回溯", description: "直接修订页面,也可让智能体协助维护。查看版本差异,必要时恢复到历史内容。", alt: "Wiki 版本历史:年假页面的历史版本列表、内容差异和回滚入口" }, ].map(withAvailability); const sandboxSlides = [ - { name: "会话级沙箱", icon: "sandbox", image: "skill-sandbox-chat", title: "在同一沙箱中继续执行任务", description: "支持 Docker、E2B、Cube。同一会话的多轮任务共用一个工作区,生成的文件可预览和下载。", alt: "WeKnora 实际界面:智能体根据知识库生成 Word 文档,并在对话旁打开产物预览", link: guide("03-features/22-skills-sandbox") }, + { name: "会话级沙箱", icon: "sandbox", image: "skill-sandbox-chat", title: "在同一沙箱中继续执行任务", description: "支持 Docker、E2B、Cube。同一会话的多轮任务共用一个工作区,生成的文件可预览和下载;macOS Lite 还可绑定本机项目目录。", alt: "WeKnora 实际界面:智能体根据知识库生成 Word 文档,并在对话旁打开产物预览", link: guide("03-features/22-skills-sandbox") }, { name: "图形桌面与终端", icon: "monitor", shots: [ { label: "图形桌面", icon: "monitor", image: "sandbox-desktop", alt: "WeKnora 实际界面:对话右侧沙箱面板的桌面页签,显示沙箱内的 XFCE 图形桌面与文件管理器" }, { label: "交互终端", icon: "terminal", image: "sandbox-terminal", alt: "WeKnora 实际界面:对话右侧的沙箱终端,列出工作区 output 目录中生成的 Word 文件" }, - ], title: "打开桌面和终端,看清每一步", description: "在对话旁打开图形桌面或交互终端,查看智能体的每一步操作,必要时亲自接手。", link: guide("03-features/22-skills-sandbox") }, - { name: "技能目录", icon: "skills", image: "skill-catalog", title: "安装、管理和复用技能", description: "从 ClawHub、SkillHub、Git 或 ZIP 安装技能,在空间内统一管理和复用。", alt: "WeKnora 实际界面:工具箱的技能管理页,列出 docx、pptx、pdf 技能及其安装到的沙箱", link: guide("03-features/22-skills-sandbox") }, + ], title: "打开桌面和终端,看清每一步", description: "在对话旁连接 Docker、E2B 或 Cube 的交互终端;使用 E2B、Cube 的桌面模板时,还可打开图形桌面并亲自操作。", link: guide("03-features/22-skills-sandbox") }, + { name: "技能目录", icon: "skills", image: "skill-catalog", title: "安装、管理和复用技能", description: "从 ClawHub、SkillHub、Git 或 ZIP 安装技能,在空间内管理和复用;macOS Lite 也支持安装并运行本机技能。", alt: "WeKnora 实际界面:工具箱的技能管理页,列出 docx、pptx、pdf 技能及其安装到的沙箱", link: guide("03-features/22-skills-sandbox") }, ].map(withAvailability); export default function Home() { @@ -53,7 +69,7 @@ export default function Home() {

- v0.8.2 本机浏览器、MCP Server 与对话分叉 + v0.8.3 画廊 · 多模态 Embedding · Wiki 图谱 · 原文引用

帮你找到答案,
并将知识付诸实践。

@@ -66,44 +82,48 @@ export default function Home() {
腾讯开源 · MIT License 支持私有化部署 自由选择模型与存储
-
+

01 / KNOWLEDGE AT WORK

知识问答、任务执行与自动 Wiki

查询资料用 RAG,处理多步任务用 Agent,
整理知识用 Wiki。三种能力共享同一知识库。

{modes.map(mode =>
{mode.number} / {mode.label.toUpperCase()}

{mode.title}

{mode.description}

    {mode.tags.map(tag =>
  • {tag}
  • )}
了解 {mode.label}
)}
-
-
-

02 / INTRODUCING v0.8.2

智能体能操作浏览器,
知识库能接入其他 AI。

查看版本说明
- -
本次更新还包括{releaseExtras.map(item =>

{item}

)}
-
-

03 / SKILLS & SANDBOX

智能体可以运行技能,
也能生成文件。

了解技能与沙箱
+
+

02 / INTRODUCING v0.8.3

图文检索、原文核对与知识组织

查看版本说明
+ +
本次更新还包括{releaseExtras.map(item => {item.name} )}
+
+
+

03 / YOUR LOCAL BROWSER

让智能体操作你自己的浏览器

连接本机浏览器
+ +
+
+

04 / SKILLS & SANDBOX

智能体可以运行技能,也能生成文件。

了解技能与沙箱
-
+
-

04 / AUTOMATIC WIKI

把文档整理成可浏览的 Wiki。

+

05 / AUTOMATIC WIKI

把文档整理成可浏览的 Wiki。

了解 Wiki 的使用方式
-
-
-

05 / INTEGRATIONS

数据源与工具集成

同步飞书、Confluence、GitLab 等平台的资料,
通过 IM、浏览器插件、MCP 或 API 查询和使用。

+
+
+

06 / INTEGRATIONS

数据源与工具集成

同步飞书、Confluence、GitLab 等平台的资料,
通过 IM、浏览器插件、MCP Server 或 API 查询和使用。

导入与同步资料

上传文件、导入网页,或连接外部数据源。

{dataSources.map(item => )}
数据源集成
团队知识库与智能体
理解 · 检索 · 推理 · 行动
-

在常用工具中访问

支持 IM 问答、浏览器插件、MCP 客户端和开发工具集成。

{clients.map(item => )}
客户端与渠道
+

在常用工具中访问

支持 IM 问答、浏览器插件、MCP 客户端和开发工具集成。

{clients.map(item => )}
客户端与渠道

通过 MCP Server 共享知识

让 Claude、Cursor 等 AI 工具连接团队知识库,直接检索资料和提问。

配置 MCP 端点
-
模型由你选择 · 内置 29 家厂商 查看全部 {modelProviders.map(item =>

)}
-
-
-

06 / BUILT FOR YOUR TEAM

私有化部署,
按团队需要管理权限。

配置数据存储与成员权限,
查看操作记录和任务运行状态。

+
模型由你选择 · 内置 30 家厂商 查看全部 {modelProviders.map(item =>

)}
+
+
+

07 / BUILT FOR YOUR TEAM

私有化部署,
按团队需要管理权限。

配置数据存储与成员权限,
查看操作记录和任务运行状态。

部署与存储

支持 Docker、Kubernetes 与 Helm,也提供 Lite 单机版和桌面应用。模型、向量数据库和存储后端可按需替换,支持本地推理。

空间与资源权限

多空间隔离与四级角色矩阵。API Key 按能力和知识库限定范围,支持 OIDC 身份集成,可限制服务只访问白名单域名。

审计与运行监控

空间审计日志、运行时任务队列面板与 Langfuse 追踪,帮助团队定位问题、管理运行状态。

-
+

GET STARTED

选择适合你的使用方式。

-
+
; diff --git a/website-docs/homepage/app/product-gallery.tsx b/website-docs/homepage/app/product-gallery.tsx index feaf83ff..7e469dee 100644 --- a/website-docs/homepage/app/product-gallery.tsx +++ b/website-docs/homepage/app/product-gallery.tsx @@ -1,7 +1,7 @@ "use client"; import Image from "next/image"; -import { useEffect, useRef, useState, type CSSProperties } from "react"; +import { useEffect, useRef, useState, type CSSProperties, type ReactNode } from "react"; import { Icon } from "./ui"; import { homeAssets } from "../../shared/header"; import s from "./home.module.css"; @@ -11,7 +11,7 @@ export type GallerySlide = { name: string; icon: string; title: string; - description: string; + description: ReactNode; /** One screenshot, or several views of the same capability switched inside the figure. */ shots: GalleryShot[]; link?: string; @@ -25,8 +25,8 @@ export type GallerySlide = { const STEP_MS = 4000; const AUTO_ROUNDS = 2; -/** A feature list beside one large screenshot; the list doubles as the navigation. */ -export function ProductGallery({ id, label, slides }: { id: string; label: string; slides: GallerySlide[] }) { +/** Feature descriptions beside a shared screenshot; each item switches its corresponding view. */ +export function ProductGallery({ id, label, slides, layout = "sidebar" }: { id: string; label: string; slides: GallerySlide[]; layout?: "sidebar" | "compact" }) { const root = useRef(null); const [item, setItem] = useState(0); const [shot, setShot] = useState(0); @@ -71,7 +71,7 @@ export function ProductGallery({ id, label, slides }: { id: string; label: strin setShot(view); } - return
setPaused(true)} onBlur={() => setPaused(false)}> + return
setPaused(true)} onBlur={() => setPaused(false)}>
{slides.map((slide, index) =>
{ if (index !== item) selectItem(index); }}>