Commit Graph

3034 Commits (d5efe5cedde738fac2dc1aad65eb2ad530bedd1e)

Author SHA1 Message Date
lyingbug d5efe5cedd
feat(website): add WeChat and Tencent Cloud usage options (#3314)
* feat(website): add WeChat platform and Tencent Cloud usage options

* style(website): use official logos for usage options

* docs(website): clarify the online platform usage description

* Revert "docs(website): clarify the online platform usage description"

This reverts commit 5a3b8e209bc3ed88ac270b674ff72fa741ae10b1.
2026-09-16 17:55:09 +08:00
lyingbug d7ccd5ba51
fix: align client sessions and integration request handling (#3305)
* fix: align client sessions and integration request handling

* fix: preserve trusted Doris redirects and prepare browser tests

* fix: align proxy address checks and integration test coverage
2026-09-16 16:20:57 +08:00
wizardchen 2bc1261b87 chore: remove vendored archives and unused Python helpers 2026-09-16 15:49:36 +08:00
ttommybot a7d3545297
feat(knowledge): add batch file downloads (#3300)
* feat(knowledge): add batch file downloads

* fix(knowledge): harden batch file downloads

Skip entries without original files, keep folder paths in the ZIP, map
client cancel to 400, and cap concurrent archives so a full-select
download is usable without 500s or disk pile-up.

* fix(knowledge): format batch-download tests for pre-push lint

---------

Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-16 15:40:10 +08:00
wizardchen 079e96ae64 fix(knowledge): make in-place file replacement race-safe
Queued ProcessDocument tasks still held the old FilePath, and a crash
between the source UPDATE and reparse could leave completed knowledge
pointing at a new file. Dequeue first, flip pending in the same write,
and skip stale worker Saves when the stored path has moved.
2026-09-16 14:54:47 +08:00
ZHE MA 419ff2507c feat(knowledge): add in-place file replacement primitive
Add KnowledgeService.ReplaceKnowledgeFile, which replaces the stored
source file of an existing file knowledge while preserving its knowledge
ID, then re-parses it through ReparseKnowledge. It is groundwork for the
local folder data source (#2873); no existing API, handler or connector
behavior changes.

Object storage is not transactional, so the steps are ordered to keep the
row pointing at an existing file: save the new file, update the source
columns in one UPDATE, reparse, and only then delete the old file. A
failed column update discards the new file; a failed reparse restores the
previous source columns (marked failed, since cleanup may already have
removed the old index) and discards the new file. The row is re-read
before a replacement file is deleted, so a write that committed despite
reporting an error never leaves the knowledge referencing a deleted file.

Identical content under the same name and folder is not re-parsed: changed
metadata is persisted and a DuplicateKnowledgeError is returned, matching
CreateKnowledgeFromFile's duplicate contract. Metadata is merged so
entries such as process overrides survive, and stored overrides are
re-validated against the new file type.
2026-09-16 14:54:47 +08:00
jacentsao 01f0700b35
feat(datasource): add Confluence sync (#3287)
* feat(datasource): add Confluence sync

* fix(confluence): resume full sync and list Server pages without CQL

CQL search silently truncates large spaces and can delete pages that
dropped out of the index. Full-sync checkpoints now keep a deletion
baseline so Asynq retries continue instead of restarting.

* fix(confluence): satisfy package lint for pre-push against main

* fix(confluence): parse Server page lists and keep version expand

The default Server/DC edition unmarshaled /content/page as a nested
envelope, so sync imported zero pages. Pagination next links also drop
expand=version,space, which made later pages versionless and hid edits.

* fix(confluence): classify errors and fail closed on empty listings

Raw Confluence error bodies were copied into sync-log UI, and pagination
next links could leave the configured context path via `..`. Empty
listings against a non-empty baseline now abort instead of deleting.

---------

Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-16 14:38:16 +08:00
lyingbug 06e8022476
feat(website): add product homepage and unified docs deployment (#3297)
* feat(website): add product homepage and unified docs deployment

* fix(website): build the unified site in a multi-stage Docker image

* fix(website): reveal and highlight the active documentation sidebar item
2026-09-16 11:58:37 +08:00
lyingbug 6f98ff80c3 Revert "fix(ui): distinguish file types and enlarge chat resource chips"
This reverts commit 42aceb17fb.
2026-09-15 22:54:52 +08:00
wizardchen 42aceb17fb fix(ui): distinguish file types and enlarge chat resource chips 2026-09-15 22:46:39 +08:00
Fei.Chen bca3a9f448
fix(storage): use virtual-hosted addressing for OBS bucket requests (#3273)
* fix(storage): use virtual-hosted addressing for OBS bucket requests

Huawei Cloud OBS has rejected path-style bucket addressing on domain
endpoints since 2023-12-30, so PutObject failed with 404 NoSuchKey while
HeadBucket still passed. The driver also pinned HostnameImmutable=true
via a deprecated custom endpoint resolver, which blocked the SDK from
injecting the bucket label into the hostname.

- Replace the custom resolver with BaseEndpoint and enable
  virtual-hosted style for domain endpoints; keep path-style as a
  defensive fallback for IP-literal or unparseable endpoints.
- Align checksum negotiation with the S3 driver
  (RequestChecksumCalculation: WhenRequired).
- GetFileURL now emits {bucket}.{endpoint-host}/{key} URLs when no
  proxy domain is configured, mirroring the client addressing.
- Share one obsS3Options constructor between the file service and the
  connectivity check, and add obs_test.go (previously zero coverage).

Closes #3269

* test(storage): assert OBS PutObject hits virtual-hosted URLs

UsePathStyle=false is not sufficient — a HostnameImmutable resolver can still force path-style. Capture the signed request host/path so this cannot regress the way #3272 would have.

* test(storage): keep OBS client tests within lint limits

The new-from-rev pre-push lint also flags the original obs_test.go lines. Wrap long fatals and silence the deprecated EndpointResolver assertion so the fork push can run hooks.

---------

Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-15 18:18:40 +08:00
wizardchen e07e782b20 fix(im): preserve errors emitted after agent completion 2026-09-15 17:56:54 +08:00
jacentsao d8126455ea fix(knowledge): allow XMind files in knowledge imports 2026-09-15 17:56:25 +08:00
lyingbug b23ae055fe
fix(im): finalize replies after agent QA returns (#3261) 2026-09-15 17:37:40 +08:00
po-et 90e3977714 test(datasource): keep yuque and ima config tests off live DNS
parseYuqueConfig and parseIMAConfig validate DefaultBaseURL through
ValidateConnectorBaseURL, which resolves the host with net.LookupIP.
Their TestMain only whitelists loopback, so the config tests fail on
any machine where www.yuque.com or ima.qq.com resolves to a restricted
address (a local DNS sinkhole, for example), and the result depends on
the network the tests happen to run on.

Whitelist the default host as well, which is what the feishu tests
already do for open.feishu.cn.
2026-09-15 15:03:45 +08:00
po-et 86d245d892 feat(helm): expose the upload size limit as global.maxFileSizeMB
The chart never rendered MAX_FILE_SIZE_MB, so a Helm install was pinned
to the image default of 50 MB with no supported way to raise it for the
frontend (nginx client_max_body_size) and docreader (gRPC message limit)
together. Add global.maxFileSizeMB, default 50 as in docker-compose, and
render it into the app, frontend and docreader containers.
2026-09-15 15:02:34 +08:00
jjj-n ffe1d7302b fix(im): stop streaming when agent execution completes 2026-09-15 14:54:34 +08:00
zhao0335 1ef38fdb8b feat(mcp): pass fileName and folder filters to knowledge APIs
create_knowledge_from_file never sent fileName, so MCP uploads always
landed in the knowledge-base root even though the backend has accepted
path-qualified names (folder_path + display name) since v0.7.2.

list_knowledge also dropped folder_path / folder_scope query params that
the REST list endpoint already supports.

Fixes #3173
2026-09-14 22:20:25 +08:00
acse-bq23 e1bbc50b6e fix(feishu): preserve active streams during long-running QA 2026-09-14 22:19:53 +08:00
chenrui 9d67a0eb4d
fix: clean up wiki data when deleting knowledge base (#3109)
* fix: clean up wiki data when deleting knowledge base

ProcessKBDelete async task cleaned up vector indices, chunks, files,
graph data and knowledge rows, but left wiki data untouched because
knowledgeBaseService had no wiki repository dependency. Add four
KB-scoped delete methods to WikiPageRepository and invoke them at the
end of ProcessKBDelete: soft-delete wiki_pages/wiki_folders/
wiki_page_issues (they carry DeletedAt), hard-delete wiki_page_revisions
(no DeletedAt column — immutable snapshots).

* fix: scope wiki KB cleanup by tenant and run it on every delete path

Wiki rows do not depend on the vector engine, so ProcessKBDelete now
cleans them in a defer (including SkipRetry). Deletes are keyed by
tenant_id plus knowledge_base_id so a tampered queue payload cannot
wipe another tenant's wiki.

---------

Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-14 21:02:31 +08:00
vicfei 780f2beb5a fix(agent): stop emitting terminal answer events for retryable empty stops
analyzeResponse emitted EventAgentFinalAnswer with Done=true before
returning emptyContent=true to the retry loop, so every empty natural
stop produced a premature terminal answer event while the agent was
still running. Consumers that finalize on Done=true (e.g. the IM
channel, which closes its answer-done channel and then only waits a
bounded time for EventAgentComplete) can lock in a fallback and cancel
the still-running agent when the nudged retry is slower than that
window (#2906).

An empty natural stop now emits nothing — the verdict alone tells the
caller the round is retryable. When retries are exhausted, the loop
emits the selected fallback as the turn's sole terminal answer, so a
turn always ends with exactly one terminal answer event.

Regression tests cover all three shapes: the empty verdict emits no
answer events; empty-then-answer ends with exactly one terminal event
carrying the real answer; all-empty runs end with exactly one terminal
event carrying the fallback (each red on the pre-fix code).
2026-09-14 21:02:15 +08:00
goodnight 86f0903473 fix: report qdrant update failures 2026-09-14 21:01:50 +08:00
dzc-bit f8daa8d785 fix(retrieval): floor ES script_score cosine at 0 to stop 400s on negative similarity
Signed-off-by: dzc-bit <210145775+dzc-bit@users.noreply.github.com>
2026-09-14 21:01:37 +08:00
zhao0335 a84f866892 fix(i18n): add missing MCP OAuth locale keys
McpServiceDialog.vue already calls t() for OAuth form labels and toasts,
but those keys were never added to the locale bundles. Non-Chinese UIs
fell back to the hardcoded Chinese defaults (Scopes, Authorization Status,
Unauthorized, Authorize, Re-authorize, Revoke, and related toasts).

Add the missing mcpServiceDialog OAuth keys and OAuth toast messages for
zh-CN, en-US, ja-JP, ko-KR, and ru-RU so the Authentication section
localizes with the rest of the settings UI.

Fixes #3182
2026-09-14 20:50:48 +08:00
VictorMaznyuk b94612a7ec
fix(agent): PUT no longer erases the avatar, and driver errors stay server-side (#3230)
* fix(agent): PUT no longer erases the avatar, and driver errors stay server-side

Two defects in the custom-agent API, both of which surface as a successful or
misleading response.

1. A config-only PUT wiped the avatar.

   UpdateAgentRequest.Avatar was a plain string, so "field omitted" and
   "explicit clear" were indistinguishable, and UpdateAgent assigned it
   unconditionally. Any caller that updated only the config — which is what
   an edit form or an SDK client does when it sends the config it changed —
   silently zeroed the avatar and still received 200.

   Avatar now travels as *string end to end: nil keeps the stored value, a
   pointer to "" is an explicit clear. The service takes it as a separate
   argument because *types.CustomAgent cannot express the difference.

2. Raw repository/driver errors reached the client.

   The fallback branches forwarded err.Error() verbatim, so a postgres
   message — for example "ERROR: value too long for type character
   varying(64) (SQLSTATE 22001)" — was returned in the API response. That
   leaks schema details and tells the caller nothing actionable. Each
   fallback now returns a fixed message naming the operation; the full error
   is still logged immediately above, so nothing is lost for diagnosis.

   The same oversized-avatar case is now rejected earlier, by ValidateAvatar,
   as a 400 that names the varchar(64) limit instead of a 500 produced by the
   database.

Typed sentinels and *errors.AppError keep their existing behaviour — only the
untyped fallbacks changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(agent): complete avatar preservation and regression coverage

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-14 20:50:15 +08:00
nullptr-error 6ccc5cedf1
feat(sandbox): add a graphical desktop to session sandboxes (#3245) 2026-09-14 20:37:37 +08:00
jacentsao 98e216841c fix(im): recover stale Yunzhijia WebSocket connections 2026-09-14 19:59:03 +08:00
DEMO 5d3114fc9e
feat(datasource): add DingTalk Docs integration with safe sync and localization (#2313)
* feat(datasource): add DingTalk Docs integration

* fix(datasource): harden DingTalk sync and complete translations

* fix(datasource): close DingTalk review gaps in sync and rendering

Prefer millisecond node timestamps, keep full-sync deletion reconciliation, and stop dropping official block payloads so incremental updates and Markdown import stay complete.

---------

Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-14 19:53:29 +08:00
wizardchen 1f82fbc9b5 fix(datasource): preserve distinct GitLab files during deduplication 2026-09-14 19:32:41 +08:00
hujiaxin fc2c12e8ec fix(models): protect auto-tag model references 2026-09-14 19:29:19 +08:00
Jonesxq 350b2ab364
fix(milvus): support multilingual BM25 retrieval (#3235)
* fix(milvus): support multilingual BM25 retrieval

* fix(milvus): preserve source metric and tighten collection matching

Read the source embedding index metric during BM25 migration, match
collections by {prefix}_{dimension}, and route Japanese/Korean text to
the ICU fallback.

* fix(milvus): satisfy lint on multilingual BM25 changes

---------

Co-authored-by: Jonesxq <239089032+Jonesxq@users.noreply.github.com>
Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-14 19:18:24 +08:00
wizardchen fbad5b3730 fix: improve model editor connection tests and save flow 2026-09-14 19:18:04 +08:00
wizardchen 935b456c3c fix(skills): isolate skill drops from global file uploads 2026-09-14 18:17:43 +08:00
wizardchen 801ae18f91 fix(embed): enforce host origin allowlists on framed pages 2026-09-14 18:03:57 +08:00
wizardchen e42f09d535 fix(datasource): validate replacement credentials before saving 2026-09-14 17:37:53 +08:00
wizardchen 17f893865d fix(memory): rank memories by the query, not by importance
Long-term memory chose its candidates before it looked at the question.
Recall listed 400 items by `importance DESC, valid_from DESC`, loaded the
vectors belonging to that list, and scored those; extraction did the same
with a 200-item pool. Importance is uncorrelated with relevance, so the
vector stage could only re-order what importance had already picked, and a
memory below the cut was unreachable no matter how well it matched. The
capacity cap goes up to 2000, so everything past the 400th most important
memory was permanently unrecallable, and `memory_item_embeddings.vector`
being a BYTEA blob meant pgvector was never involved.

The store now answers "which of this person's memories is this question
about":

- Migration 000095 (and the SQLite mirror) add `embedding halfvec` plus a
  `(tenant_id, subject_id, model_id, dims)` index. The column is
  conditional on the vector extension, so a deployment whose retrieval
  driver excludes postgres keeps working. No HNSW: an approximate index is
  filtered after the fact, and one subject holds at most a couple of
  thousand rows, so exact ordering inside the scope is both correct and a
  few milliseconds.
- `SearchItemsByVector` ranks in SQL over every vector the subject has,
  with the status, expiry and kind filters joined in so reaching past the
  candidate list cannot reach past the filters. SQLite and pgvector-less
  PostgreSQL fall back to scoring in process, still over the whole scope.
- Recall fuses the lexical ranking with those hits and grows the candidate
  pool with matches the pool did not hold, which is what lets the search
  escape it. The lexical pool is now the capacity cap, so it can no longer
  be a second, invisible limit under the one that decides what stays active.
- Extraction picks the memories it shows the model the same way. This
  matters more than recall: the memory a new statement contradicts is not
  reliably an important one, so an importance-ordered window hid exactly
  the collision that stops a duplicate being written.
- Vectors are written to the searchable column in the upsert's transaction;
  rows predating the column are moved by `SyncVectorColumn` during
  maintenance, which costs no model calls. The embedding backfill goes from
  50 to 200 per run — at 50, a subject at the capacity cap took over a
  month to become fully searchable.
- Traces and logs report `outside_pool`, the number of semantic matches the
  lexical pool did not contain. It was structurally zero before, so it is
  the number to watch when asking whether semantic recall does anything.

Tests cover whole-scope ranking, the lifecycle and kind filters, pool
growth, the pool-size invariant, and extraction seeing a low-importance
memory it would otherwise duplicate. A pgvector integration test
(WEKNORA_MEMORY_TEST_POSTGRES_DSN) exercises the migration, the halfvec
write, the SQL ranking and the column sync.
2026-09-13 11:43:17 +08:00
lyingbug fd7fa6a7d4
fix(memory): preserve extraction progress and atomic memory updates (#3224)
* fix(memory): preserve extraction progress and atomic memory updates

* fix(memory): bound extraction failures and persist indexed session progress
2026-09-13 00:04:16 +08:00
wizardchen 462999ec3f feat(browser): add picture-in-picture task preview 2026-09-12 11:11:36 +08:00
wizardchen 815d32d3a9 fix(sandbox): use E2B BuildID as template version
Disable the docker idle sweeper in integration tests so shared developer daemons are not reaped.
2026-09-12 10:31:14 +08:00
wizardchen a799f23b26 feat(sandbox): stream live shell and install command output
Publish a bounded stdout/stderr tail for pending shell_exec and skill installs without putting partial logs into the model context.
2026-09-12 10:16:39 +08:00
wizardchen 3db7fd5389 fix(tracing): keep sandbox RPC spans under their owning operations
StartChildSpan records sandbox housekeeping only when a parent trace already exists, and skill install/remove/maintenance open that boundary themselves.
2026-09-12 10:15:54 +08:00
wizardchen eeaaa7f64c fix(preview): repair PptxGenJS slide masters so previews render
vue-office-pptx shows zero slides when generated decks omit unused master declarations; rewrite the preview copy without changing the stored file.
2026-09-12 10:14:43 +08:00
lyingbug 3910cfb117
fix(browser): complete task cancellation, screenshots, and result display (#3206) 2026-09-12 09:32:26 +08:00
wizardchen 081851c6b8 fix(browser): support human handoffs and resume interrupted tasks 2026-09-11 23:56:13 +08:00
lyingbug 7a98a8e3de
feat(browser): polish connection settings, open tasks in a new window, and streamline prompts (#3193)
* feat(browser): enhance BrowserIcon component and update localization strings

- Updated BrowserIcon component to accept dynamic width and height props.
- Revised localization strings in English, Japanese, Korean, Russian, and Chinese for improved clarity and user guidance regarding browser connection and usage instructions.
- Enhanced BrowserConnectionSettings view with better structure and user feedback elements.

* Default BrowserSkill tasks to a separate window

* refactor(prompts): streamline agent system prompts and context templates

- Updated agent system prompts to enhance clarity and specificity in user interactions.
- Revised context templates to better separate metadata and user requests, improving overall structure.
- Adjusted fallback and intent prompts to ensure consistent language handling and response requirements.
- Introduced new localization strings for browser search instructions across multiple languages.
- Added tests for agent prompt serialization and hydration to ensure template integrity and functionality.

* chore: wrap prompt strings to satisfy golangci-lint

Keep the settings, separate-window, and prompt commits pushable together
without rewriting their history.

* fix(frontend): match agent editor save test to serialized payload

The prompt-inheritance save path still closes after update; the test
should assert that payload, not the unsanitized form object.

* feat(browser): implement browser connection management and related tests

- Introduced a new `browserConnection` store to manage the state of browser connections, including online status and device information.
- Updated the `Input-field` component to handle browser connection states, enabling/disabling features based on the connection status.
- Added tests for the `browserConnection` store to ensure correct behavior under various scenarios.
- Enhanced the `Input-field` and `BrowserConnectionSettings` components to provide user feedback based on the browser connection state.
- Adjusted related components and views to integrate the new browser connection logic, improving overall user experience.

* fix(frontend): update model-save assertion for serialized agent payload

The agent editor still persists the selected model ID via a spread of
formData; the source test should match that payload, not the raw form.
2026-09-11 21:28:58 +08:00
lyingbug 7e53c31671
feat(browser): connect local Chrome with task controls and display modes (#3180)
* feat(browser): integrate BrowserSkill local task tabs and account pairing

* feat(browser): refine task routing, lifecycle, and display modes

* fix(browser): reclaim temporary task tabs and groups

* test(database): cover browser authorization migration schema
2026-09-11 17:59:27 +08:00
LuckVd 8c2c976127 fix(agent): honor MCP service advanced_config.timeout for CallTool window
The agent engine derives every tool's execution ctx from a blanket 60s
budget (toolExecutionTimeout), so MCP calls on services configured with a
longer advanced_config.timeout were silently cancelled mid-flight even
though the MCP transport layers honor that value (internal/mcp/client.go,
manager.go). The configuration was partially applied without any signal.

Re-derive the CallTool window from ApprovalCtx (the round-level parent
without the per-tool deadline) using the service timeout when it extends
the engine window. Widening-only by design: services without an explicit
longer timeout keep today's behavior, and shorter values stay enforced
where they already apply (HTTP transport timeout).

Fixes #3135
2026-09-11 17:47:04 +08:00
lyingbug 72581cb462 Revert "feat(sandbox): add safe live file management to session sandboxes (#3…"
This reverts commit 01205b3d56.
2026-09-11 17:42:08 +08:00
DEMO 01205b3d56
feat(sandbox): add safe live file management to session sandboxes (#3181)
* feat(sandbox): add safe live file management to session sandboxes

* fix(sandbox): keep live files from waking paused sandboxes

Serialize directory entries as "directory", refuse Files-tab Connect on paused runtimes, and cap list/delete trees so oversized workspaces fail closed.

---------

Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-11 17:31:53 +08:00
langcaiye 5db13a131e
feat(faq): filter entries by enabled status (#3157)
* docs: design FAQ enabled-status filter

* feat(faq): filter entries by enabled status

* test(faq): cover disabled list filtering

* docs(faq): publish enabled filter contract
2026-09-10 14:42:59 +08:00