Apply the same tenant/integration secret policy to auth login, OIDC
callback, switch-tenant, and invite-register payloads, and return masked
config objects from Admin-only tenant KV PUT handlers.
Prevent low-privileged tenant members from reading raw API keys and
infrastructure credentials via tenant profile, KV config, model/MCP/web
search listings, and KB initialization config responses.
Use SSRF-safe HTTP clients in chat pipeline web_fetch and Feishu/Yuque/Notion
connectors, validating tenant-supplied base_url values before outbound requests.
Use the SSRF-safe HTTP client for file_url downloads and add redirect-aware
guards to the docreader Playwright path, closing GHSA-44fp, GHSA-rv6v, and
GHSA-c7m6.
Gate wiki GET routes and initialization config reads with KBAccessRead,
and bind async task progress endpoints to the caller tenant via task ID
parsing. Closes cross-tenant read paths reported in GHSA-ph8f-4qwx-89rr
and related initialization/progress leaks.
Harden validateNode with default-deny semantics and PG17 SQL/JSON node
recursion so dangerous functions cannot hide inside JSON_SCALAR/JSON_VALUE.
Also recurse into FROM subqueries for DuckDB data_analysis and block
read_text/read_blob and related file-access functions.
IM channels cannot complete in-conversation OAuth prompts, so when an
MCP service needs authorization the reply now includes clickable
authorization URLs (when APP_EXTERNAL_URL and OAuth manager are
available) instead of only directing users to the admin console.
Restore logger config via t.Cleanup after t.Setenv so Yuque token tests
do not leak global state, add unit tests for MCP OAuth non-interactive
context helpers and IM auth notice formatting, and fix EmbedChatCore
indentation.
Some VLM models (e.g. certain vision models) only accept temperature=1.
Previously temperature was hardcoded to 0.1. Now reads from model's
ExtraConfig["temperature"] with fallback to default 0.1.
Usage: set ExtraConfig.temperature=1 in the VLM model configuration.
Remove redundant hero icons from the Chrome extension and Claw Skill
landing headers, and keep Claw CTA hover states on the lobster accent
instead of the default brand green.
Gate the integrations API tab and sidebar preview behind owner role,
matching Settings and the /api-principal-config backend guard, so users
without permission no longer see a 403 error when opening the tab.
Implement migration 000064 to introduce principal columns in MCP OAuth tokens, widen user_id in sessions, and add tenant API principal configuration. Remove previous migrations related to API principal config and user_id widening.
Wire embed visitor ID through chat and MCP OAuth flows, add embed i18n,
redesign API integration settings (signed-token docs, layout), and rename
the integrations tab to API Integration with a server icon.
Add a dedicated cancel route so users can skip mid-conversation OAuth without
token verification, and restyle OAuth/approval cards to match AgentStreamDisplay
with compact inline actions.
OAuth authorization was only handled in MCPTool.Execute, so unauthenticated
services failed silently during RegisterMCPTools before any tool reached the
agent. Wire EventBus/session metadata into registration and reuse the same
getOrCreateMCPClientWithOAuthRetry path used at execution time.
Extract MCP OAuth session/wait/connect logic into mcp_oauth.go and remove the
duplicate waitForOAuthAndRetry + RegisterMCPContext layering in mcp_tool.go.
When an agent invokes an OAuth-enabled MCP service that the current user has
not authorized yet, the tool call now pauses and surfaces an "Authorize" card
in the chat instead of failing with an opaque error. After the user completes
the per-user OAuth popup, the backend verifies a token exists and resumes the
paused tool call automatically.
Backend:
- Add mcp_oauth_required / mcp_oauth_resolved events and response types.
- Add OAuthPendingRequest + Gate.RequestOAuthAndWait, reusing the existing
approval waiter, Resolve, Redis cross-instance fan-out and timeout.
- MCPTool.Execute pauses on an authorization-required error for OAuth services
and retries once (with a fresh ctx and recycled connection) after the user
authorizes.
- Forward the new events to the SSE stream.
- Add ResolveMCPOAuth handler + route; it verifies authorization before
unblocking so a premature resolve cannot resume into another failure.
Frontend:
- Add McpOAuthCard with an Authorize button reusing the popup + status-poll
flow, then resolve the paused run.
- Handle the new stream events (dedup multiple pending cards per service).
- Add resolveMCPOAuth API client and i18n keys (zh/en/ko/ru).
Select the auth header for the configured strategy only, instead of
emitting both X-API-Key and Authorization whenever the fields happened
to be set (which double-authed after switching strategies). AuthType=""
keeps the legacy infer-from-fields behavior for pre-existing rows.
Add a configurable api_key_header (non-secret, defaults to X-API-Key) so
services expecting the key in a different header work without plaintext
custom headers.
On connection test, upgrade a bare 401 that advertises RFC 9728
protected-resource metadata into an explicit OAuthRequired signal so the
UI can guide the user to switch to OAuth 2.0. Surface the server's
description from the initialize handshake in the test result.
- Introduced tests for buildMustUseBlock to validate multi-word service prefix handling and name sanitization.
- Ensured that service names are correctly sanitized to prevent newline injection in must_use blocks.
- Verified that the generated block includes the correct tool name prefixes and does not contain unwanted characters.
Fixing the knowledge_create_test compile error in this branch let the
internal/application/service test package run for the first time, which
exposed two latent failures introduced when GetKnowledgeByID started
eagerly loading tags:
- GetOwningKBCreatorID went through the service-level GetKnowledgeByID
(which now calls repo.GetKnowledgeTags); ownership resolution only
needs the knowledge -> kb_id link, so resolve via repo.GetKnowledgeByID
directly (tenant-scoped) and drop the extra tag query.
- createKnowledgeFileRepoStub lacked GetKnowledgeTags, which the create
path always invokes via setAndAttachKnowledgeTags; add the stub method.
- Fix grep_chunks dropping the full-KB scope when a turn mixes @KB with
@tag/@file: extract scopeClause and OR knowledge-ID and (kb,tenant)
predicates together, matching knowledge_search's fan-out.
- Consolidate the three scattered per-request @Skill/@MCP scope blocks in
buildAgentConfig into applyPerRequestSkillScope / applyPerRequestMCPScope,
each narrowing the whitelist and computing the must_use pin in one place.
- Dedupe the two identical selection-mode normalizers in Input-field.vue.
- Fix knowledge_create_test passing "" for the tagIDs []string parameter,
which made the whole service test package fail to compile.
- Add unit tests for scopeClause and the per-request scope helpers.
Tighten per-turn @MCP/@Skill/@tag handling after review: enforce agent
MCP/Skill whitelist, ignore mentions when selection mode is none, tag-scope
grep_chunks, and simplified English must_use lines without tool dumps.
Skip persisting scope envelopes to history rendered_content.
Wire per-turn @mentions for skills, MCP services, tags, and files through
QA handlers into agent config, runtime_context/must_use user blocks, and
tool registration. Fix tag-only scopes dropping KB tools, refresh suggested
questions on mention changes, and strengthen MCP must_use so @selected
services are invoked before local KB search.
Two pre-existing test failures on main, unrelated to any feature change:
- Doris VectorRetrieve/KeywordsRetrieve inline LIMIT as a literal (Doris
does not support placeholders for LIMIT/OFFSET), but the SQL-shape tests
still expected `LIMIT ?` with TopK as a bound arg. Match the literal
LIMIT and drop the extra argument.
- TestOssEnsureBucket_CreateFails used the bucket name "test-bucket",
which already exists globally on OSS, so IsBucketExist short-circuited
and the create path never ran. Use a non-existent bucket name so the
create-with-invalid-credentials path is actually exercised.
Replace 7 hardcoded service host/port values with environment variable
references that preserve the existing defaults, so users can override them
via .env to connect to external infrastructure (DB, Redis, Qdrant, Milvus,
Neo4j) without editing docker-compose.yml.
- DB_DRIVER, DB_HOST, DB_PORT
- QDRANT_HOST
- MILVUS_ADDRESS
- REDIS_ADDR
- NEO4J_URI
Add a compact stacked icon preview when hovering the Publish & Integrations
menu item so users can see available channels before opening the page.
Centralize integration tab metadata in config for easier future additions.
Change the knowledge card hover popover from following the mouse to being
anchored to the card element with smart boundary detection. Try positioning
in order: right, left, bottom, and top of the card, automatically avoiding
viewport edges. Also add CSS hints (will-change, backface-visibility,
translateZ) to prevent popover content jitter.
Move Chrome extension and Claw Skill entries from the user menu into the
integrations center with dedicated landing tabs, setup steps, and lobster-themed Claw styling.
Align embedding outbound requests with chat module defenses by validating
base URLs at construction time and using SSRFSafeDialContext with redirect checks.
Suppress duplicate origin, builtin, role, and org-name pills on knowledge
base, agent, and organization list cards when the visible group header or
sidebar filter already conveys the same information.
Fetch publish tokens when opening an embed channel drawer so deploy snippets
stay available after browser restarts, while list endpoints still omit secrets.
Split tag filtering from CRUD management on the knowledge base document
page, align copy to "tags" across locales, and polish hover/detail surfaces
with setting-drawer section styling. Return tags from GetKnowledge for the
detail drawer.