Commit Graph

23 Commits (5d3601c4e4d0cfc2c86268f10cc1c3d2a67dcd8e)

Author SHA1 Message Date
Zhang GH aac4f1586b
Fix/hybrid search match count normalization (#2750)
* fix(hybrid-search): normalize MatchCount once instead of at the truncation site

An omitted match_count deserializes to Go's zero value, which reached the
truncation step in HybridSearch and sliced the deduplicated chunk list to
[:0] — a successful retrieval returned an empty result set. A negative
value panicked on that same slice bound and surfaced as a 500.

Resolve the value once at the top of HybridSearch via normalizedMatchCount
so all three consumers agree, rather than patching the truncation site
alone: the over-retrieval floor, the FAQ iterative-retrieval trigger
(which never fired on this path because len(chunks) < 0 is false), and the
truncation itself.

Bound the FAQ iterative path while here, since normalization is what makes
it reachable with a large MatchCount: its TopK seeds from MatchCount*3 and
doubles five times, previously without limit. It now stops at the pool cap
instead of re-issuing an identical query.

Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor(retrieval): share the default retrieval depth as one constant

The value 50 was written three times — the over-retrieval floor in
HybridSearch, the MatchCount fallback added alongside it, and
RetrievalConfig.GetEffectiveEmbeddingTopK — with nothing recording that the
three are meant to agree. Anyone tuning one would silently desync the
others.

Promote it to types.DefaultRetrievalTopK. No behavior change.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: drakezhang <drakezhang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 11:36:38 +08:00
JohnWick348 37ea8893f5 docs: update website screenshot tracker 2026-08-18 11:28:13 +08:00
wizardchen 9b4f792a04 fix(docker): 默认在 app 镜像中链接 anydoc 解析引擎
Hub / compose 打包的二进制此前走 stub,设置页会显示引擎未编入。WITH_ANYDOC 改为默认开启,并补上 builder 所需的 curl。
2026-08-16 13:31:51 +08:00
wizardchen e123f8247e feat(docparser): 引入 anydoc 引擎,在 Go 进程内解析 office 文档
通过 cgo 链接 anydoc Rust 静态库,把 docx/pptx/xlsx 等转为带原位图片的 Markdown;扫描版 PDF 无文字层时回落到 DocReader OCR。默认构建不链接该库。

Co-authored-by: lyingbug <lyingbug@users.noreply.github.com>
2026-08-16 11:37:27 +08:00
jacentsao 64d17a0211 feat(im): process file attachments in QA 2026-08-12 16:08:51 +08:00
wizardchen d6d177f3ab fix(i18n): harden DEFAULT_LOCALE runtime config after #2658
Whitelist locale tags in docker-entrypoint to prevent config.js injection,
extract resolveDefaultLocale with trim/validation, add unit tests, and sync
local dev config plus docs for the new deployment default language setting.
2026-08-12 10:53:23 +08:00
lyingbug 517942c846
feat(sandbox): unify remote sandbox on E2B protocol with self-hosted support (#2655)
* feat(sandbox): unify remote sandbox on E2B protocol with self-hosted support

- Add e2b.proxy_url gateway config and generic gateway transport layer
- Add envd compat layer for Basic auth and multipart /files uploads
- Support Dockerfile.sandbox runtime and e2b-backend build targets in CI
- Rename sandbox image non-root user to align with E2B template convention
- Add sandbox-protocol.md and extend cluster deployment / local repro docs

Enables connecting to any E2B-compatible control plane (E2B Cloud,
CubeSandbox, Agent-Sandbox, etc.) without per-backend client code.

* style(sandbox): gofmt tenant_resolver struct alignment
2026-08-11 20:14:19 +08:00
wizardchen 738fe1ec53 feat(sandbox): 沙箱后端改为按空间配置,并补齐 E2B 模板与检测诊断
沙箱的后端类型、凭据、模板、超时和私网访问策略此前分散在部署级
WEKNORA_SANDBOX_* 环境变量里,一个实例只能有一套,租户之间无法各用
自己的 E2B 账号或自建 Cube 集群。现在这些配置全部落到空间维度的具名
沙箱配置上:部署环境不再提供覆盖项,未选择配置的智能体直接不启用脚本
执行,而不是静默回落到某个部署默认值——后者会让「这个智能体到底跑在
哪」无从判断。

同时把连接检测从「能不能连上控制面」扩展成可解释的诊断:
- E2B 标准模板显式带上 default 标签构建。创建沙箱时裸模板名/ID 只解析
  default 标签,构建带了别的标签就永远拿不到,表现为一个与「模板不存在」
  无法区分的 404。
- 模板状态不再从历史构建或 spawn 次数反推就绪,只认当前构建;构建完成
  却没有 default 标签的模板单独报成 untagged,因为它在列表里和「仍在构建」
  长得一样,但等待永远不会有结果。
- 创建失败带上 HTTP 状态,404 走模板解释路径,给出具体到「重建模板」还是
  「Key 属于其他团队」的结论。
- 探针脚本改在进程工作目录下暂存。系统临时目录在 macOS 上位于
  /var/folders,Docker 虚拟机并不共享,挂载进容器后是空目录,真实技能执行
  (脚本在 skills/ 下)却不会踩到,检测因此报假失败。
- 检测失败不再只说「命令输出与预期不符」,带上退出码与 stderr 首行。

前端把沙箱设置页与配置抽屉重做:凭据按「是否已配置」展示而非回显掩码,
删除与停用改为就地确认,占用情况走右侧抽屉,列表卡片展示模板状态、凭据、
超时等可判断健康度的事实。
2026-08-11 15:42:02 +08:00
wizardchen 89221ba015 docs(release): prepare v0.7.2 release notes and version bump
Update version numbers, CHANGELOG, multilingual READMEs, QA docs,
architecture diagram, and showcase screenshots for the v0.7.2 release.
2026-08-07 11:37:05 +08:00
wizardchen ac9656af1d docs(website): use VERSION label in landing footer note 2026-08-06 21:59:01 +08:00
wizardchen b30f369ca3 feat(docker): add custom entrypoint script and update Dockerfile
Introduce a new entrypoint script for the Nginx container to ensure proper startup behavior. Update the Dockerfile to use a stable-alpine Nginx base image and include the entrypoint script, enhancing the deployment process for the documentation site.
2026-08-06 21:59:01 +08:00
wizardchen 84eb205a27 fix(nginx): change server listen port from 80 to 8081
Update the Nginx configuration to listen on port 8081 instead of the default port 80. This change is necessary for serving the documentation site correctly in the current deployment setup.
2026-08-06 21:59:01 +08:00
wizardchen 10293acba3 feat(website-docs): add Dockerfile and Nginx configuration for documentation site
Introduce a Dockerfile for building the documentation site using VitePress and an Nginx configuration for serving the built assets. The Dockerfile sets up a multi-stage build process, while the Nginx config handles routing and caching for the /docs/ path. Update VitePress configuration to set the base path for asset links. This enhances the deployment process for the WeKnora documentation site.
2026-08-06 21:59:01 +08:00
wizardchen 0a310e5327 docs(website): add official site link and inject VERSION at build time
Read the repo VERSION file for footer and landing hero labels, and add navigation to https://weknora.weixin.qq.com from the docs site.
2026-08-06 21:59:01 +08:00
wizardchen 267c847fb8 docs: complete docker compose pull guidance across deployment docs
Follow up on #2567 by documenting the upgrade workflow, syncing JA/KO
READMEs and installation guide, and clarifying that WEKNORA_VERSION
changes require docker compose pull to avoid stale cached images.
2026-08-06 19:58:02 +08:00
wizardchen f266ac4dcf feat(website-docs): add quickstart sample data and local MCP demo
Provide demo documents and FAQ import JSON for onboarding tests, plus a
minimal HTTP Streamable MCP server for validating WeKnora MCP integration.
2026-08-06 19:54:40 +08:00
wizardchen f780f81fc0 docs(website-docs): add comprehensive product documentation site
Import and update WeKnora documentation with VitePress: getting started,
architecture, features, API reference, clients, and development guides.
Includes landing page with inline SVG illustrations, theme components,
doc check scripts, and product screenshots.
2026-08-06 19:54:40 +08:00
lyingbug 8d9309e8fc Revert "docs: add comprehensive WeKnora documentation"
This reverts commit 4aeef20b46.
2026-08-06 19:52:25 +08:00
lyingbug 09e900c779 Revert "feat(docs): initialize WeKnora documentation site with VitePress"
This reverts commit 99c483f6eb.
2026-08-06 19:52:25 +08:00
lyingbug fefc2c1dc0 Revert "docs: complete docker compose pull guidance across deployment docs"
This reverts commit 485454a9ea.
2026-08-06 19:51:39 +08:00
wizardchen 485454a9ea docs: complete docker compose pull guidance across deployment docs
Follow up on #2567 by documenting the upgrade workflow, syncing JA/KO
READMEs and installation guide, and clarifying that WEKNORA_VERSION
changes require docker compose pull to avoid stale cached images.
2026-08-06 19:30:55 +08:00
wizardchen 99c483f6eb feat(docs): initialize WeKnora documentation site with VitePress
This commit sets up a new documentation site for WeKnora using VitePress. Key additions include:

- A structured `.gitignore` to manage ignored files.
- An `index.md` file serving as the landing page with a clear title and layout.
- A `package.json` and `package-lock.json` to manage dependencies, including VitePress and related plugins.
- Thematic styles and components for a cohesive user experience, including a custom landing page and zoom functionality for diagrams.
- A README update to guide users on local development and site structure.

This foundational setup aims to enhance user onboarding and provide comprehensive documentation for the WeKnora system.
2026-08-06 18:29:35 +08:00
wizardchen 4aeef20b46 docs: add comprehensive WeKnora documentation
This commit introduces a complete set of documentation for WeKnora, organized into six main sections: Getting Started, Architecture, Features, API Reference, Clients, and Development Guide. Key highlights include:

- Detailed installation instructions and quick start guides.
- In-depth architectural overview and backend design documentation.
- Comprehensive feature descriptions, including multi-tenant support, document parsing, and agent capabilities.
- API reference covering approximately 360 endpoints with usage examples.
- Client documentation for various interfaces including web, CLI, and SDK.

This documentation aims to facilitate user onboarding and provide a thorough understanding of the WeKnora system.
2026-08-06 18:29:35 +08:00