Commit Graph

3204 Commits (e6284f4eacc89a4b2f1ef2469e9f86241e2841cd)

Author SHA1 Message Date
wizardchen e6284f4eac fix(browser): let shared-space agents drive the caller's local browser
A shared agent runs in its owner's workspace, so the execution tenant in
the turn context is the owner's. The local_browser tool built its device
scope from that tenant, while the browser is paired under the asking
member's own workspace, so every call from a shared agent found no device
and told the user to pair again.

Resolve the browser scope from the authenticated caller instead, both
when registering the tool and in its owner check. Agents in the caller's
own workspace are unaffected: without a tenant switch the caller and the
execution tenant are the same.
2026-09-24 18:19:17 +08:00
Chu Quang Vinh eebc1d8643
fix(ui): restore inner padding on form popups (#3673)
#3376 put the shared wk-popover skin on the invite, share-link, create-user,
reset-password and change-password popups. The skin sets padding:0 and
overflow:hidden, which suits menus, and the same commit removed each
popup's own padding, min-width and max-height rules. The forms now sit
flush against the popup border and the primary button's corner is clipped.

Add a wk-popover--form modifier that brings back the pre-#3376 frame
(14px 16px padding, min/max width, scroll when tall) and put it on those
five popups.

Fixes #3672
2026-09-24 18:18:10 +08:00
lyingbug 967ed09706
feat(models): add system admin model catalog console (#3662)
* feat(models): add system admin model catalog console

System administrators can now maintain the model catalog from
Settings → System administration → Model catalog instead of editing
models.json on every replica. Administrator changes are stored as a
versioned overlay in the database (new model_catalog_config table),
layered between the deployment file and explicit per-model settings,
and synchronised to other instances within about 5 seconds.

Backend
- GET/POST preview/PUT /system/admin/model-catalog with optimistic
  version + deployment baseline checks (409 on conflict), 20-version
  history and audit logging.
- Console overlays reject credentials, headers, env interpolation and
  non-inline icons; those stay deployment-owned.
- Catalog views include each chat model's resolved thinking levels and
  the vendor defaults, so the console never re-implements level
  inheritance.

Frontend
- Model list in the shared data-table style with provider/type filters,
  "modified only" filter and source tags (built-in / deployment / admin).
- Edit drawer saves and applies immediately: display name, context
  window, max output, input modalities, reasoning, thinking levels,
  embedding dimension and picker visibility, each with its inherited
  default and a layer comparison table.
- Add-model drawer, JSON editor with server-side change check before
  publishing, and version history with one-step restore.
- Model settings gets a system-admin shortcut to the catalog; model
  editor reloads providers when opened so published catalogs apply.

* fix(models): harden the admin model catalog console

- Reject console base_url, base_urls, url_patterns and auth: moving a
  vendor's default URL would send its deployment api_key (and keys of rows
  without their own base URL) to another host. With every interpolated
  field now deployment-owned, '$' in names and descriptions is plain text.
- Drop deployment base URLs from catalog views; they may carry
  interpolated tokens.
- Remember a stored version this replica cannot compile and skip it until
  the version changes, instead of re-reading and recompiling every poll.
- Resolve vendor default thinking levels with reasoning forced on, like
  per-model levels.
- Compute builtin/deployment views once; preview returns only the
  candidate catalog and normalized overlay.
- Share deployment file lookup via runtime.ReadDeploymentOverlay.
- The model editor force-refreshes its own type instead of resetting the
  provider store for every type; the refreshed list wins in the id index.
2026-09-24 16:31:45 +08:00
wizardchen 8d40150149 fix(session): keep auto-generated titles plain text
The title prompt sent the user's first message as a raw user turn, so a
query ending in "summarise it in a table" made the model emit a Markdown
table that became the session title.

- Wrap the query in a <user_message> block (embedded delimiter tags are
  neutralised) and append a guard to the configured system prompt telling
  the model to treat the block as data and never follow its instructions.
- sanitizeGeneratedTitle now drops a full <think> block, keeps the first
  line with content, strips headings, list/quote markers, labels, links,
  inline markup and wrapping quotes, and falls back to a 30-rune plain-text
  prefix of the user query when the output is still table-like.
- Tighten the default session title template.
2026-09-24 15:56:09 +08:00
wizardchen b6b32c24e1 test(website-docs): update integration test for the v0.8.2 header and release gallery
The docs header gained a '版本' entry, and the homepage release gallery
now ends with the 对话控制 slide linking to 03-features/18-chat-experience
instead of the v0.8.0 memory slide. Expect the new header entry, and
assert the release link lands on the chat-experience page by path and
heading. The memory doc stays covered by the search and direct-route
checks.
2026-09-24 15:54:17 +08:00
wizardchen cee697920e fix(website-docs): serve everything but the homepage from /docs/
The site is deployed behind an upstream router that forwards only `/` and
`/docs/`. The homepage export also claimed /_next/, /brand/, /brands/,
/product/, /favicon.ico and Next's root RSC payloads, so behind that router
the page loaded without its scripts, styles or images.

Next's assetPrefix and the homepage's public assets now live under
/docs/_home/ (one `homeAssets` constant shared with the docs header), the
favicon reuses /docs/favicon.ico, and build-site.mjs leaves only index.html,
404.html and docs/ at the root. The homepage logo links are plain anchors
because <Link> navigation fetches RSC payloads from the root. check-site.mjs
now fails the build if a page references anything outside `/` and `/docs/`
or if anything else appears at the site root.
2026-09-24 15:24:16 +08:00
wizardchen 3e8b0bfc80 docs: describe the Lite host sandbox workspace choices accurately in the READMEs 2026-09-24 14:18:55 +08:00
wizardchen 503f1abfb4 fix(confluence): confirm unlisted pages before deleting after a cut-short listing
On a Server/DC instance with the #3596 behaviour every listing ends
early, so skipping deletion reconciliation for such runs meant pages
deleted in Confluence were never removed from the knowledge base.

When a listing is cut short, look up each previously synced page it did
not return with GET /rest/api/content/{id}?expand=space and delete it
only when Confluence confirms it is gone from the space: a 404, a
non-current status, or a different space. Pages that are still there,
that fail to load (including 403), or that exceed the 200-probe budget
per run stay tracked and are checked again next time.
2026-09-24 14:18:55 +08:00
wizardchen 9f57bbe4da docs: date the v0.8.2 release and describe it in the READMEs
Move the CHANGELOG and release-notes date to 2026-09-24. In all four
READMEs, add the v0.8.2 entry to Latest Updates and bring the overview
and feature tables up to date: local browser, built-in MCP Server,
conversation control, artifacts library, sandbox terminal and desktop,
Lite host sandbox, model catalog, Confluence, Bocha / Serply, UI
languages and whitelist-only outbound. The MCP Server section now points
to the built-in server and marks the Python one deprecated.
2026-09-24 14:18:55 +08:00
wizardchen 5468e7c191 chore: bump version to 0.8.2
Bump VERSION, the frontend and docs-site packages, the Helm appVersion
and the README badges, plus the docs pages that quote the current
version.
2026-09-24 14:18:55 +08:00
wizardchen eb888d0d3d fix(confluence): stop Server listings that link past the last page
Some Server/Data Center builds keep returning _links.next from
/rest/api/space/{key}/content/page after the last page, with empty
results (#3596). The connector followed it until the 10000-hop cap, so a
sync ran for hours, imported nothing and then failed.

Stop after three consecutive empty pages that still link onward. A
single empty page is not taken as the end, since permission filtering
can empty one window mid-listing. A listing cut short this way is
reported as incomplete: its pages are imported, pages it did not reach
stay in the cursor, and deletion reconciliation is skipped for that run
so an early stop cannot mirror-delete documents.
2026-09-24 14:18:55 +08:00
wizardchen a1b0d0cb6c fix(models): serve qwen3-rerank on the native DashScope rerank protocol
The catalog rebuild marked qwen3-rerank unsupported because Alibaba also
documents a flat /compatible-api/v1/reranks shape for it. The native
text-rerank endpoint serves the same model with identical scores (#3558),
and v0.8.0 routed it there, so existing Aliyun rerank rows naming it
failed with "failed to get rerank model" after upgrading.

Drop the unsupported override and the deprecated flag so the model
resolves to dashscope-rerank again and shows up in the picker.
2026-09-24 14:18:55 +08:00
lyingbug 2e712a97a1
fix(mcp): return accessible image URLs from existing tools (#3650)
* fix(mcp): return accessible image URLs from existing tools

* fix(mcp): resolve resource URLs via binding lookup and cover shared KBs

- Look up the KBs that bind each reference instead of scanning every
  allowed KB, and cache per-KB grants for the call. Unrestricted
  endpoints accept any KB the caller can view, so ask answers drawing
  on agent-selected shared KBs get links too.
- Share grant/owner-tenant resolution with scopedKBContext via
  authorizeKB; log non-denial authorization errors.
- Drop the redundant resource-catalog re-wrap; both sources are
  already wrapped.
- Skip the structured-content round trip when no storage reference is
  present, rewrite non-object results, and log marshal/decode failures.
- Quote ask image lines with strconv.Quote so & stays literal, and
  never cut an excerpt inside a storage reference.
2026-09-24 11:56:25 +08:00
dvd233 e87607e852
fix(mcp): expose wiki output in structured content (#3590) 2026-09-24 11:49:57 +08:00
lyingbug be46eabaf2
docs: sync website-docs, homepage and changelog for v0.8.2 (#3632)
* docs: sync website-docs with changes since v0.8.0

Audit every change between v0.8.0 and the v0.8.2 release against the
documentation site, adding what users and operators need and correcting
statements that no longer match the code.

- Add local browser (BrowserSkill), built-in MCP Server endpoints, the
  toolbox, conversation steer/fork/rewind and reasoning effort, the
  artifacts library, sandbox terminal and desktop, the Lite host sandbox,
  the rebuilt model catalog (including a protocol-compat field reference),
  Confluence and DingTalk Docs sources, Bocha/Serply search, per-channel IM
  locale, whitelist-only outbound, admin user creation, new configuration
  variables and migrations 000091-000110.
- Fix wrong API examples and parameters (model type values, knowledge
  search params, FAQ match_count cap, Notion credentials), tenant deletion
  semantics, default timeouts, parser engine claims, removed tables and
  commands, stale navigation paths, and route locations after the router
  split into routes_*.go.
- Add screenshots for the new pages and refresh outdated ones.

* fix(frontend): link the protocol-compat field to its documentation

The model editor told users to read catalog/compat.go on the backend, a
path that no longer exists after the model catalog refactor. The hint now
says when the override is needed and links to the field reference in
website-docs/03-features/06-models.md; the config examples and the API
type comment point to the same place.

* feat(website): showcase v0.8.2 on the homepage

- Add a v0.8.2 section for the local browser (BrowserSkill), the built-in
  MCP Server and conversation control, and turn the v0.8.0 release block
  into a standing skills & sandbox topic with the sandbox desktop and
  terminal.
- Replace the three-up galleries with a feature list beside one large
  screenshot: every item's text stays visible, clicking an item or one of
  its views switches the image with a cross-fade, and the list plays itself
  while on screen until the visitor picks something.
- Add Confluence, DingTalk, BrowserSkill and more model vendors to the
  integrations, bump the header badge to v0.8.2 and link the changelog.
- check-site reports missing docs screenshots as pending instead of
  failing, since the Screenshot component renders a placeholder for them.

* docs(changelog): add v0.8.2 release notes

* docs(website): add per-version release notes pages

Add a "版本发布" docs section with one page per release, starting with
v0.8.2 and a backfilled v0.8.0. Each page walks through the highlights
with the existing product screenshots, the other improvements and fixes,
and an upgrade checklist with the actions each breaking change needs.

The sidebar orders these pages by version, newest first; the docs header
gains a 版本 entry, and the homepage's v0.8.2 section now links to the
release notes page instead of the raw CHANGELOG.

* feat(website): let the site image listen on a configurable port

The Docker image hard-coded `listen 80`, so running it with host
networking or on a platform that assigns the container port required
editing the Nginx config and rebuilding. The image now renders its
config from the official nginx template directory at startup and reads
the listen port from `PORT` (default 80); deploy/nginx.conf stays a plain
config for static deployments.

test-docker starts a second container with PORT=8080 and checks the
rendered config and that the site answers on that port; the README
documents the variable.

* fix(website): namespace the nginx listen port variable

* fix(website): support bash-wrapped container startup

* fix(website): align nginx startup with frontend entrypoint

* fix(website): pin nginx runtime for older host compatibility

* fix(website): bake the configured nginx port into the image
2026-09-24 11:26:34 +08:00
yeliheng-010 608027179f fix(gitlab): 补齐项目资源列表分页 2026-09-24 07:52:32 +08:00
wizardchen 4a026fc896 fix(docs): update remaining references to migrated documentation 2026-09-24 07:51:31 +08:00
hahahahahayesyeseys 11edd16819 fix(datasource): fail closed on GitLab compare errors 2026-09-24 07:49:07 +08:00
wizardchen 1fa915d712 chore: update BrowserSkill extension version to 0.3.1 and enhance localization support
- Updated the BROWSERSKILL_EXTENSION_PATH in .env.example and Dockerfile.app to reference the new extension version 0.3.1.
- Modified localization files for English, Japanese, Korean, Russian, and Chinese to reflect the support for both Chrome and Edge browsers.
- Added checks for extension version compatibility in the BrowserConnectionSettings component to improve user experience.

This commit ensures that the application is aligned with the latest BrowserSkill extension and enhances the localization for better user guidance.
2026-09-23 17:12:19 +08:00
wizardchen e6e41ed301 feat(browser-connection): add sidebar connection status and localization support
- Implemented a toggle in the settings to show the browser connection status in the sidebar.
- Updated the menu component to display the connection status for the browser connection tool.
- Added localization strings for the sidebar status in English, Japanese, Korean, Russian, and Chinese.
- Enhanced the UI store to manage the visibility of the sidebar browser status.

This commit improves user experience by providing real-time feedback on the browser connection status directly in the sidebar.
2026-09-23 17:12:19 +08:00
wizardchen 2e801677a0 fix(frontend): use radius and motion tokens in toolbox styles
The style guard ratchet rejected new px radii and ms durations in the
toolbox tabs, browser connection cards, and sidebar tool stack.
2026-09-23 17:12:19 +08:00
wizardchen fd016df98c feat(toolbox): introduce toolbox feature with skills, MCP, and browser connection management
- Added new toolbox section to manage skills, external tools, and browser connections.
- Implemented routing and access control for toolbox items.
- Created corresponding icons and localization for toolbox features.
- Updated various components to integrate toolbox functionality, including menu and settings.
- Added tests for toolbox access and functionality.

This commit enhances the user experience by providing a dedicated area for managing tools related to agent capabilities.
2026-09-23 17:12:19 +08:00
wizardchen 02734d7499 feat(chat): add session reasoning controls and polish model configuration 2026-09-23 17:12:19 +08:00
lyingbug e179f44445
refactor(models): separate provider definitions, model catalogs, and runtime configuration (#3589)
* refactor(models): separate providers, catalog and runtime configuration

* refactor(models): isolate provider definitions and runtime catalogs

* docs: exclude refactoring analysis notes from the pull request
2026-09-23 14:20:08 +08:00
linus-liu-web 653307b5c7
fix(wiki): 整页重写被补全预算截断时续写,续写用尽则拒绝写回(长名单 146→119) (#3582)
* fix(wiki): 整页重写被补全预算截断时续写,续写用尽则拒绝写回

wiki ingest 路径对 finish_reason 完全无感知:generateWithTemplate 只返回
response.Content,被截断的半页会被原样写回(长名单 146 行 → 119 行,没有提示,
revision history 里看起来就是一次普通编辑)。对照 agent 路径早已有
isLengthFinishReason 处理,两条路径对同一个 provider 信号的处理不对称。

- prompts_wiki.go:新增 WikiPageModifyContinuationPrompt(重放半页,从断点续写,
  禁止重写已写内容)
- wiki_ingest.go:新增 wikiTemplateResult{Content, FinishReason}、
  errWikiPageRewriteTruncated、isLengthStopFinishReason;generateWithTemplate 变薄壳,
  新 generateWithTemplateResult 承担原逻辑并保留既有重试语义;仅对
  WikiPageModifyUserPrompt 在 finish_reason=length 时续写(≤3 轮,无缝拼接,
  "(complete)" 视为已完),仍截断则返回错误 → 走既有分支:warning + 不写页 +
  additionFailed
- 新增 wiki_page_rewrite_continuation_test.go(5 个用例)

Fixes #3581

* style(wiki): 折行以符合 lll 的 120 字符上限

---------

Co-authored-by: linus-liu-web <11640009+linus-liu-web@users.noreply.github.com>
2026-09-23 12:17:07 +08:00
LuckVd c57766cc76
fix(tenant): stop wiki tasks of soft-deleted tenants from issuing model requests (#3602)
* fix(tenant): stop wiki tasks of soft-deleted tenants from issuing model requests

Tenant deletion only soft-deletes the tenant and its memberships; its
knowledge bases, model configs, and durable task_pending_ops rows survive.
Wiki ingest/finalize tasks restored from those ops only checked KB state,
so a deleted tenant kept accruing new LLM requests (observed as ~11h of
continued synthesis calls in #3593).

Gate every task entry point on tenant liveness:

- EnqueueIfKnowledgeBaseActive now also requires tenants.deleted_at IS NULL
  inside the same transaction (fail closed).
- Startup recovery purges pending rows whose tenant is soft-deleted (the
  predicate is wrapped in parentheses: NOT EXISTS(...) AND EXISTS(...) would
  parse as (NOT EXISTS(...)) AND EXISTS(...) and silently match nothing).
- Wiki ingest and finalize handlers check tenant liveness from the payload
  before any model call and drop the KB's queue when the tenant is gone.
  Liveness lookup errors fail open; the guarded enqueue and recovery paths
  enforce the same invariant on their own DB access.

Adds TaskPendingOpsTenantLiveness as an optional extension interface,
regression tests for the enqueue guard, startup recovery, and the task
entry guards.

Fixes #3593

* style(container): wrap long log line over 120 chars for golangci-lint (lll)

---------

Co-authored-by: LuckVd <LuckVd@users.noreply.github.com>
2026-09-23 12:13:32 +08:00
nullptr-error 23832fabad
feat(lite): let new chats bind a host project directory (#3554)
* feat(lite): let new chats bind a host project directory

Unpinned Lite sessions already run on the host sandbox. The new-chat page can now pick an approved project, and the header shows that workspace instead of a full path.

* docs(lite): publish the host sandbox note on the site

The published docs live in website-docs, so the host backend entry belongs in the sandbox guide. Session creation also stops rewriting project_dir inside the shared API helper.

---------

Co-authored-by: hailongzhao <hailongzhao@tencent.com>
2026-09-23 12:12:08 +08:00
YixuanLieu 06ae6bcf04
fix(docreader): kill timed-out converter process groups (#2990)
* fix(docreader): kill timed-out converter process groups

(cherry picked from commit 403ee6dd90ad6836f4f073f4f06839884133a7e4)

* fix(docreader): bound timeout reap so converter cleanup cannot hang

Unbounded communicate() after killpg waited for pipe EOF and could
block a DocReader worker if a descendant left the process group.

---------

Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-23 12:02:53 +08:00
Frank Zhu acd1a2a5a4
docs(ollama): document embedding model config and RAM guidance (#3531)
* docs(ollama): document embedding model config and RAM guidance (#3480)

Local embedding and generation share the Ollama process at OLLAMA_BASE_URL.
The embedding model name is the local Embedding model's name; EMBEDDING_MODEL_NAME
is read only when builtin_models.yaml references it. The published 8 GB
starting point does not include Ollama weights or optional Neo4j.

Fixes #3480

* docs(ollama): shrink README/docs scope per maintainer review (#3480)
2026-09-23 12:02:42 +08:00
Captain 171097f06e
feat(security): add a whitelist-only outbound mode that refuses before DNS (#3393)
* feat(security): add a whitelist-only outbound mode that refuses before DNS

A penetration test of a private deployment found that a host outside
SSRF_WHITELIST still produces a DNS query: every outbound guard resolves
the name first and judges the addresses afterwards, which is what makes
it immune to DNS rebinding, but it also means an attacker-chosen name
reaches the resolver and can carry data out of an otherwise offline
network (#3378).

SSRF_DNS_WHITELIST_ONLY makes the whitelist the whole egress policy, and
the check is placed wherever a name is still in hand.

Where a URL is available, CheckSSRFWhitelistOnly refuses a host the
whitelist does not name, IP literals included: URL validation, the
sandbox outbound policy, and the web-fetch target resolver.

Where only a dial address is available, CheckDialWhitelistOnly judges
hostnames and leaves addresses to the checks that already exist, because
an IP arriving at a dialer is either a name something else resolved or a
literal the URL layer already refused. That covers the shared SSRF-safe
dialer, the web-fetch dialer, the Yunzhijia webhook dialer, and every
sandbox transport: the HTTP and websocket data planes, the guarded
transport and the Docker engine now share one GuardedDialContext instead
of each building its own dialer.

Where the client resolves its own target, the name is judged before the
client exists. gRPC's resolver runs before any dialer it was given, so
the env-configured qdrant and milvus clients are built through small
constructors that refuse a non-whitelisted host outright; a whitelisted
one is resolved by gRPC as before.

docreader enforces the same switch in its own validator, and compose
passes the variable to both services.

Matching is by name only in this mode: the whitelist's CIDR entries
still match an IP literal, but a hostname is no longer resolved to see
whether its addresses fall inside one, because that lookup is the query
the mode exists to prevent.

The value is parsed with ParseBool, and a non-empty value that parses as
neither enables the mode: silently leaving an egress lockdown off
because an operator wrote "yes" is the one failure mode a security
control must not have.

Still not covered, and documented as such: the Langfuse OTLP exporter
builds its own client and never reaches these guards; and with
HTTP(S)_PROXY set the proxy host is dialled unguarded when the dial
address equals the proxy URL's host exactly, while a mismatch makes the
proxy host itself subject to the whitelist.

The switch defaults to off, so nothing changes for deployments that do
not set it.

* docs(security): document SSRF_DNS_WHITELIST_ONLY in website-docs

docs/ has been retired in favour of website-docs/ (#3580), so the notes that
lived in docs/QA.md move to the configuration table: the new switch, what to
whitelist before turning it on, and the three outbound paths it still does
not cover.

The existing SSRF_WHITELIST row was also stale: compose gives only the app its
SSRF_WHITELIST_EXTRA default (which now includes minio), and docreader's is
empty, so "shared by app and docreader" held for SSRF_WHITELIST alone.
2026-09-23 12:02:06 +08:00
徐少 2c6ae0c262
fix(session): reject invalid QA queries before session lookup (#3477)
* fix(session): reject invalid QA queries before session lookup

* fix(session): narrow shared QA input validation
2026-09-23 12:01:33 +08:00
jjj-n b86821f551
feat(im): add per-channel reply locale (#3455) 2026-09-23 12:01:01 +08:00
ttommybot ad20ea9c9b
feat: add configurable sorting to document and resource lists (#3318)
* feat: add configurable sorting to document and resource lists

* fix: use typography tokens in sort controls

* fix: satisfy sorting lint checks
2026-09-23 12:00:21 +08:00
Leon 402729341a
fix(docparser): make PaddleOCR-VL request timeout configurable (#3537)
* fix(docparser): make PaddleOCR-VL request timeout configurable

* style(docparser): wrap timeout configuration and test lines
2026-09-23 11:58:59 +08:00
LuckVd ee3623ab76
fix(wiki): reuse cross-type page for same-title items instead of creating twins (#3547)
* fix(wiki): reuse cross-type page for same-title items instead of creating twins

Re-ingesting the same document can flip the model's page-type judgment for
the same real-world thing (first extracted as concept/X, later as entity/X).
The exact-identity fast path only matched same-type pages, and the slug
carries the type prefix, so every reparse materialized another concept/X +
entity/X twin pair that then cross-link to each other (fixes #3526).

- exactIdentityTarget: same-type exact match still wins; with no same-type
  page, a cross-type candidate with the same normalized title is reused so
  the write path updates the existing page instead of creating a twin
- attachExactIdentityPages: cross-type safety-net lookup (batched and
  cached like the same-type pass) covers same-title pages the trigram probe
  missed
- regression tests for the fallback, the same-type preference, and the
  no-leak guarantee for unrelated titles

* docs(wiki): update identity-title comment; assert cross-type binding in tests

Review feedback on #3547:
- normalizeWikiIdentityTitle's comment no longer claims same-type-only
  scope: it now drives cross-type entity/concept reuse as well
- stubNormalizedTitleWiki filters fixtures by pageType and the batching
  test asserts the cross-type safety net binds concept/mencius onto the
  entity item and registers it in candidatePages
- rename TestExactIdentityTargetSameTypeOnly to
  TestExactIdentityTargetPrefersSameType to reflect what it now pins

---------

Co-authored-by: LuckVd <LuckVd@users.noreply.github.com>
2026-09-23 11:58:29 +08:00
linus-liu-web 8b059331b6
fix(graph): 给 Neo4j SearchNode 加上种子上限与行数兜底,避免一次查询拉回整个邻域 (#3550)
fix(graph): 按 review 收紧 SearchNode 的种子排序、关系过滤与日志级别
2026-09-23 11:57:57 +08:00
hahahahahayesyeseys 407b184081 fix(chat): report truncated model fallback answers 2026-09-23 11:57:21 +08:00
wizardchen 5279972eec fix(agent): give local_browser one text cap and per-method signatures
The flat schema advertised both max_tokens and max_text_chars, so models
sent the log field to observe. Keep a single character budget, map page
reads onto the extension token cap, and list each method's arguments.
2026-09-23 11:49:39 +08:00
wizardchen b8f081f03a fix(browser): refine connection and preview UI with extension version 2026-09-23 10:57:59 +08:00
lyingbug a89a5a2c43
fix(browser): use unmodified BrowserSkill upstream and remove downstream patches (#3563)
* fix(browser): move BrowserSkill baseline to upstream main with merged patches

Upstream merged the navigation response grace (#291), the preview/focus UI
channel (#296) and popup attribution (#297). Pin both ends to commit c61eb7e4
and drop patches 02, 04 and 06. WeKnora now calls the official ui.task_preview
and ui.task_focus methods.

Patch 05 (last-tab lifecycle) is replaced host-side: before tool.tab_close the
gateway lists the Agent Window's tabs and, when the target is the only one,
creates an agent-owned about:blank tab through tool.tab_create so Chrome does
not remove the window and report a user interruption. Patch 01 (bounded CDP
reads and screenshot fence) is rebased onto the new baseline and remains the
only downstream extension change.

The real-extension test follows the upstream borrow semantics: an unowned tab
inside the Agent Window is rejected in place and borrowed after being moved to
a regular window.

* fix(browser): narrow the BrowserSkill read-reliability patch

Keep isAbortError strict and add isCaptureTerminalError for the capture
pipeline, so a renderer read timeout stops fallback reads but tool handlers
report it as cdp_failed instead of cancelled; the gateway no longer pauses the
task on a read timeout.

Drop the CDP-level screenshot fence and the 3 s screenshot deadline: upstream
PR #296 already bounds preview captures and fences them per attachment, and
tool screenshots are serialized by the daemon queue. Stop routing the focus
emulation toggle through the deadline so upstream's raw-command serialization
keeps holding. Remove the duplicate background rendering browser test; the
upstream background-execution and background-screenshot tests cover it.

* docs(browser): link the read-reliability patch to upstream PR #318

* fix(browser): keep BrowserSkill frame discovery consistent after a read timeout

Sync patch 01 with the follow-up pushed to upstream PR #318: a timed-out child
Target.setAutoAttach keeps its session and is retried from getFrameGraph, and
timed-out frame-tree, frame-owner and root auto-attach reads reject the frame
graph instead of letting the coordinator queue a snapshot behind them.

* style(browser): gofmt focus.go

* fix(browser): roll back the last-tab placeholder and surface renderer read timeouts

The placeholder about:blank tab created before tool.tab_close stayed behind
when the extension refused the close (unauthorized or borrowed tab) or the
call was interrupted. After a failed close the gateway lists the Agent Window
again and removes the placeholder while the target tab still exists; when the
extension already closed the target before the reply was lost, the placeholder
is what keeps the window open and stays.

Sync patch 01 with upstream PR #318: renderer reads on a tab are refused while
a timed-out read is still running in Chrome, and observation errors carry
data.reason = renderer_read_timeout. Map that reason to a model hint that
stops repeated reads on the unresponsive tab instead of the generic
inspect-and-retry advice for cdp_failed.

* fix(browser): remove remaining BrowserSkill patches

* fix(browser): add official extension link and setup guidance
2026-09-23 00:22:34 +08:00
wizardchen 4afda18ec1 fix(chat): keep composer fixed while messages overscroll 2026-09-22 23:27:20 +08:00
lyingbug 63ef76dd80
docs: 迁移有效文档至 website-docs 并清理旧文档 (#3580)
* docs: consolidate maintained documentation in website-docs

* docs: remove migrated legacy documentation and update remaining references
2026-09-22 23:25:40 +08:00
wizardchen fbf9f54b6a fix(chat): prevent overscroll bounce from moving composer 2026-09-22 23:11:51 +08:00
wizardchen d69df50b7a fix(chat): align knowledge citation hover with outline cards 2026-09-22 22:59:57 +08:00
lyingbug b57c362667
fix(chat): show full date for older message timestamps (#3576) 2026-09-22 22:48:43 +08:00
lyingbug 6afb6ca9d5
feat(knowledge): flag documents that stop making progress (#3557)
* feat(knowledge): flag documents that stop making progress

A document stuck in processing looked the same as one still working: a
spinner that polled forever, no hint of where it stopped, and, hours
later, a generic housekeeping failure.

- The batch and spans endpoints return last_activity_at for in-flight
  rows: the later of updated_at and the newest span write. updated_at
  only moves at stage transitions; span writes keep moving while a long
  stage still works.
- After 20 minutes with no progress, the list and card views show
  "may be stuck" with a tooltip. The timeline shows the stage it
  stopped at and a stop-parsing button, plus a "last progress" stat.
  Both pollers back off to 15s while everything in flight is stalled.
- When housekeeping fails a row, the error names the stalled stage and
  the time of the last progress. It closes the row's open spans with
  TASK_STALLED (the running stage fails, the rest are cancelled), so
  the timeline shows where the run stopped instead of a spinner.

* fix(knowledge): locate stalls in finalizing and tell backlog from stuck

- Housekeeping reads the stall site from the latest attempt. It takes
  the running stages, or, when none runs (post-process closes its stage
  once enrichment is fanned out), the innermost running spans, mapped
  back to their stage. Those spans fail with TASK_STALLED and are named
  in the message; every stalled stage is listed in pipeline order. The
  other open spans are cancelled. Every closed span gets a duration, and
  the message leaves out the time when the heartbeat query failed.
- The spans tree prefers a TASK_STALLED failure for last_error over a
  later subtask failure. current_stage falls back to the stage owning a
  running subspan.
- Batch and spans responses flag rows quiet past the stall hint whose
  work is still queued (waiting_in_queue), using the sweep's own probes.
  At most 20 rows are probed per request, cached for a minute. The UI
  shows these as queued, with no stop button in the banner.

* fix(knowledge): answer stall verdicts from one shared queue scan

- Probing a quiet document for a backlog rescanned the whole queue once
  per document. When the document was absent, which is exactly the
  stuck case, the scan ran to the end, and it read a Redis error as
  "nothing queued". QueuedKnowledgeIDs now collects every referenced
  knowledge ID in one pass and returns list errors. HousekeepingService
  keeps that snapshot for a minute, shared across requests and
  single-flight. A failed scan is not cached.
- With the per-request cap of 20 gone, every quiet row on a page gets a
  verdict. The response carries it as stall_state (queued or stalled),
  replacing waiting_in_queue. The UI marks a row as stuck only on a
  "stalled" verdict. A row with no verdict, because the probe failed,
  shows as ordinary processing instead of inviting a stop.
2026-09-22 21:34:08 +08:00
wizardchen 0a99a2850b fix(knowledge): address review of the stuck-processing fixes
- Abort check: a read failure now stops the pipeline instead of carrying
  on. Continuing let a later full-row Save overwrite a cancel or delete
  it never saw. processChunks now returns an error, and the handlers
  return it, so asynq retries an unknown state instead of acking it.
- Resolve the vector store before deleting the old chunks, and retry
  when the lookup itself failed. A failed persist or an interrupted
  context no longer acks with the row still in flight.
- Drain and release the wiki slots in one transaction, so a failed
  release rolls the delete back for the retry. Skip any document that
  still has a fresh claim in the lane: its live batch releases it.
- Re-armed and restart-recovered wiki triggers carry the language the
  ops were queued with, rather than the server default.
2026-09-22 20:33:18 +08:00
wizardchen d951cb78d1 fix(knowledge): stop pipeline errors from stranding rows in processing
- Return an error when the processing to finalizing handoff fails to
  persist instead of acking; the ack read as "no longer processing" and
  left a non-wiki row stuck with no retry.
- Only a missing row reads as deleting in the abort check. A transient
  read error made callers wipe a live document's chunks and index and
  return silently.
- Convert handler panics into errors below the dead-letter middleware so
  the final-attempt callback marks the row failed, and recover them in
  the Lite-mode executor, where a panic took down the process.
- Fail the attempt when the KB's vector store cannot be resolved rather
  than dereferencing a nil retrieve engine later.
2026-09-22 20:33:18 +08:00
wizardchen af3ac25bc1 fix(wiki): release documents a stranded wiki queue holds in finalizing
Housekeeping skips any row that still has a durable wiki ingest op, with
no age limit, so a wiki that can never run left its documents in
"finalizing" forever:

- A KB whose wiki was disabled, has no synthesis model, or whose model
  was deleted failed the trigger before claiming anything; after the
  retries the trigger was archived and the ops stayed. Treat these as
  terminal: drain the unclaimed ingest ops and release each document's
  wiki slot. Retract ops stay queued; rows a live batch holds are left
  to it.
- A lost or archived trigger left the ops with nothing to wake their
  consumer until a restart. Housekeeping now re-arms one trigger per KB
  for rows held only by durable ops, at most once per stale threshold.
2026-09-22 20:33:18 +08:00
wxggzz 273db881c6 fix(mcp): assemble multiline SSE events before parsing 2026-09-22 20:09:02 +08:00